current=0;
bi=MagickFalse;
status=MagickFalse;
- if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
- ActivateSemaphoreInfo(&resource_semaphore[type]);
- LockSemaphoreInfo(resource_semaphore[type]);
+ switch (type)
+ {
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&resource_semaphore[type]);
+ LockSemaphoreInfo(resource_semaphore[type]);
+ break;
+ }
+ default: ;
+ }
switch (type)
{
case AreaResource:
break;
}
}
- UnlockSemaphoreInfo(resource_semaphore[type]);
+ switch (type)
+ {
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ UnlockSemaphoreInfo(resource_semaphore[type]);
+ break;
+ }
+ default: ;
+ }
if ((limit == MagickResourceInfinity) || (size < limit))
status=MagickTrue;
if (IsEventLogging() != MagickFalse)
resource;
resource=0;
- if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
- ActivateSemaphoreInfo(&resource_semaphore[type]);
- LockSemaphoreInfo(resource_semaphore[type]);
+ switch (type)
+ {
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&resource_semaphore[type]);
+ LockSemaphoreInfo(resource_semaphore[type]);
+ break;
+ }
+ default: ;
+ }
switch (type)
{
case AreaResource:
default:
break;
}
- UnlockSemaphoreInfo(resource_semaphore[type]);
+ switch (type)
+ {
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ UnlockSemaphoreInfo(resource_semaphore[type]);
+ break;
+ }
+ default: ;
+ }
return(resource);
}
\f
current,
limit;
+ bi=MagickFalse;
+ limit=0;
+ current=0;
switch (type)
{
- case AreaResource:
- case HeightResource:
- case ListLengthResource:
- case ThreadResource:
- case ThrottleResource:
- case WidthResource:
- return;
- default:
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&resource_semaphore[type]);
+ LockSemaphoreInfo(resource_semaphore[type]);
break;
+ }
+ default: ;
}
- bi=MagickFalse;
- limit=0;
- current=0;
- if (resource_semaphore[type] == (SemaphoreInfo *) NULL)
- ActivateSemaphoreInfo(&resource_semaphore[type]);
- LockSemaphoreInfo(resource_semaphore[type]);
switch (type)
{
case DiskResource:
break;
}
}
- UnlockSemaphoreInfo(resource_semaphore[type]);
+ switch (type)
+ {
+ case DiskResource:
+ case FileResource:
+ case MapResource:
+ case MemoryResource:
+ case TimeResource:
+ {
+ UnlockSemaphoreInfo(resource_semaphore[type]);
+ break;
+ }
+ default: ;
+ }
if (IsEventLogging() != MagickFalse)
{
char