From: cristy Date: Sun, 26 Jan 2014 01:40:27 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2788 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39bd7bedc8ce8120fe440ebf940b1d5d117526b2;p=imagemagick --- diff --git a/MagickCore/semaphore-private.h b/MagickCore/semaphore-private.h index c3450e73c..fe3ec898b 100644 --- a/MagickCore/semaphore-private.h +++ b/MagickCore/semaphore-private.h @@ -48,26 +48,27 @@ static MagickBooleanType static inline void DestroyMagickMutex(void) { if (active_mutex != MagickFalse) + { #if defined(MAGICKCORE_OPENMP_SUPPORT) - omp_destroy_lock(&semaphore_mutex); -#elif defined(MAGICKCORE_THREAD_SUPPORT) - ; + omp_destroy_lock(&semaphore_mutex); #elif defined(MAGICKCORE_HAVE_WINTHREADS) - DeleteCriticalSection(&semaphore_mutex); + DeleteCriticalSection(&semaphore_mutex); #endif + } active_mutex=MagickFalse; } static inline void InitializeMagickMutex(void) { if (active_mutex == MagickFalse) + { #if defined(MAGICKCORE_OPENMP_SUPPORT) - omp_init_lock(&semaphore_mutex); -#elif defined(MAGICKCORE_THREAD_SUPPORT) - ; + omp_init_lock(&semaphore_mutex); #elif defined(MAGICKCORE_HAVE_WINTHREADS) - InitializeCriticalSection(&semaphore_mutex); + InitializeCriticalSection(&semaphore_mutex); #endif + } + active_mutex=MagickTrue; } static inline void LockMagickMutex(void)