11 #define MAGICKCORE_IMPLEMENTATION 1 12 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1 21 #if defined(MAGICKCORE_HAVE_PTHREAD) 31 if ((sysError=::pthread_mutexattr_init(&attr)) == 0)
32 if ((sysError=::pthread_mutex_init(&_mutex,&attr)) == 0)
34 ::pthread_mutexattr_destroy(&attr);
41 #if defined(_VISUALC_) && defined(_MT) 48 security.nLength=
sizeof(security);
49 security.lpSecurityDescriptor=(LPVOID) NULL;
50 security.bInheritHandle=TRUE;
53 _mutex=::CreateSemaphore(&security,1,1,(LPCSTR) NULL);
54 if (_mutex != (HANDLE) NULL)
57 "mutex initialization failed");
69 #if defined(MAGICKCORE_HAVE_PTHREAD) 70 (void) ::pthread_mutex_destroy(&_mutex);
72 #if defined(_MT) && defined(_VISUALC_) 73 (void) ::CloseHandle(_mutex);
80 #if defined(MAGICKCORE_HAVE_PTHREAD) 84 if ((sysError=::pthread_mutex_lock(&_mutex)) == 0)
89 #if defined(_MT) && defined(_VISUALC_) 90 if (WaitForSingleObject(_mutex,INFINITE) != WAIT_FAILED)
99 #if defined(MAGICKCORE_HAVE_PTHREAD) 103 if ((sysError=::pthread_mutex_unlock(&_mutex)) == 0)
108 #if defined(_MT) && defined(_VISUALC_) 109 if (ReleaseSemaphore(_mutex,1,(LPLONG) NULL) == TRUE)
MagickPPExport void throwExceptionExplicit(const MagickCore::ExceptionType severity_, const char *reason_, const char *description_=(char *) NULL)