18 #ifndef MAGICKCORE_SEMAPHORE_PRIVATE_H 19 #define MAGICKCORE_SEMAPHORE_PRIVATE_H 21 #if defined(__cplusplus) || defined(c_plusplus) 25 #if defined(MAGICKCORE_OPENMP_SUPPORT) 28 #elif defined(MAGICKCORE_THREAD_SUPPORT) 29 static pthread_mutex_t
30 semaphore_mutex = PTHREAD_MUTEX_INITIALIZER;
31 #elif defined(MAGICKCORE_WINDOWS_SUPPORT) 44 #if defined(MAGICKCORE_OPENMP_SUPPORT) 46 omp_destroy_lock(&semaphore_mutex);
53 #if defined(MAGICKCORE_OPENMP_SUPPORT) 55 omp_init_lock(&semaphore_mutex);
62 #if defined(MAGICKCORE_OPENMP_SUPPORT) 63 omp_set_lock(&semaphore_mutex);
64 #elif defined(MAGICKCORE_THREAD_SUPPORT) 76 #elif defined(MAGICKCORE_WINDOWS_SUPPORT) 77 while (InterlockedCompareExchange(&semaphore_mutex,1L,0L) != 0)
84 #if defined(MAGICKCORE_OPENMP_SUPPORT) 85 omp_unset_lock(&semaphore_mutex);
86 #elif defined(MAGICKCORE_THREAD_SUPPORT) 98 #elif defined(MAGICKCORE_WINDOWS_SUPPORT) 99 InterlockedExchange(&semaphore_mutex,0L);
103 #if defined(__cplusplus) || defined(c_plusplus) static void UnlockMagickMutex(void)
Definition: semaphore-private.h:82
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:36
static ssize_t semaphore_mutex
Definition: semaphore-private.h:36
#define pthread_mutex_lock
Definition: vms.h:824
static MagickBooleanType active_mutex
Definition: semaphore-private.h:40
static void InitializeMagickMutex(void)
Definition: semaphore-private.h:51
static void LockMagickMutex(void)
Definition: semaphore-private.h:60
Definition: exception.h:78
MagickBooleanType
Definition: magick-type.h:189
Definition: magick-type.h:192
static void DestroyMagickMutex(void)
Definition: semaphore-private.h:42
#define pthread_mutex_unlock
Definition: vms.h:826
Definition: magick-type.h:191