const size_t,ExceptionInfo *),
*SetPixelCacheNexusPixels(const CacheInfo *,const MapMode,const ssize_t,
const ssize_t,const size_t,const size_t,const MagickBooleanType,
- NexusInfo *,ExceptionInfo *) magick_hot_spot;
+ NexusInfo *magick_restrict,ExceptionInfo *) magick_hot_spot;
#if defined(MAGICKCORE_OPENCL_SUPPORT)
static void
% Quantum SetPixelCacheNexusPixels(const CacheInfo *cache_info,
% const MapMode mode,const ssize_t x,const ssize_t y,const size_t width,
% const size_t height,const MagickBooleanType buffered,
-% NexusInfo *nexus_info,ExceptionInfo *exception)
+% NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
static inline MagickBooleanType AcquireCacheNexusPixels(
const CacheInfo *magick_restrict cache_info,const MagickSizeType length,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+ NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception)
{
if (length != (MagickSizeType) ((size_t) length))
{
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
+#include "MagickCore/semaphore.h"
#include "MagickCore/string_.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
static WarningHandler
warning_handler = DefaultWarningHandler;
\f
+/*
+ Static declarations.
+*/
+static SemaphoreInfo
+ *exception_semaphore = (SemaphoreInfo *) NULL;
+\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% %
++ E x e c e p t i o n C o m p o n e n t G e n e s i s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ExceptionComponentGenesis() instantiates the exception component.
+%
+% The format of the ExceptionComponentGenesis method is:
+%
+% MagickBooleanType ExceptionComponentGenesis(void)
+%
+*/
+MagickPrivate MagickBooleanType ExceptionComponentGenesis(void)
+{
+ if (exception_semaphore == (SemaphoreInfo *) NULL)
+ exception_semaphore=AcquireSemaphoreInfo();
+ return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
++ E x c e p t i o n C o m p o n e n t T e r m i n u s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ExceptionComponentTerminus() destroys the exception component.
+%
+% The format of the ExceptionComponentTerminus method is:
+%
+% void ExceptionComponentTerminus(void)
+%
+*/
+MagickPrivate void ExceptionComponentTerminus(void)
+{
+ if (exception_semaphore == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&exception_semaphore);
+ LockSemaphoreInfo(exception_semaphore);
+ UnlockSemaphoreInfo(exception_semaphore);
+ RelinquishSemaphoreInfo(&exception_semaphore);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% G e t E x c e p t i o n M e s s a g e %
% %
% %
ErrorHandler
previous_handler;
+ if (exception_semaphore == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&exception_semaphore);
+ LockSemaphoreInfo(exception_semaphore);
previous_handler=error_handler;
error_handler=handler;
+ UnlockSemaphoreInfo(exception_semaphore);
return(previous_handler);
}
\f
FatalErrorHandler
previous_handler;
+ if (exception_semaphore == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&exception_semaphore);
+ LockSemaphoreInfo(exception_semaphore);
previous_handler=fatal_error_handler;
fatal_error_handler=handler;
+ UnlockSemaphoreInfo(exception_semaphore);
return(previous_handler);
}
\f
WarningHandler
previous_handler;
+ if (exception_semaphore == (SemaphoreInfo *) NULL)
+ ActivateSemaphoreInfo(&exception_semaphore);
+ LockSemaphoreInfo(exception_semaphore);
previous_handler=warning_handler;
warning_handler=handler;
+ UnlockSemaphoreInfo(exception_semaphore);
return(previous_handler);
}
\f