MagickCore  6.9.11-60
Convert, Edit, Or Compose Bitmap Images
semaphore.h
Go to the documentation of this file.
1 /*
2  Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://imagemagick.org/script/license.php
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  MagickCore methods to lock and unlock semaphores.
17 */
18 #ifndef MAGICKCORE_SEMAPHORE_H
19 #define MAGICKCORE_SEMAPHORE_H
20 
21 #if defined(__cplusplus) || defined(c_plusplus)
22 extern "C" {
23 #endif
24 
25 typedef struct SemaphoreInfo
27 
28 extern MagickExport void
30 
33 
35  *AllocateSemaphoreInfo(void);
36 
37 extern MagickExport void
43 
44 #if defined(__cplusplus) || defined(c_plusplus)
45 }
46 #endif
47 
48 #endif
LockSemaphoreInfo
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:293
MagickExport
#define MagickExport
Definition: method-attribute.h:80
SemaphoreInfo::signature
size_t signature
Definition: semaphore.c:72
AlignedExtent
#define AlignedExtent(size, alignment)
SemaphoreInfo::reference_count
ssize_t reference_count
Definition: semaphore.c:69
ActivateSemaphoreInfo
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **)
LockMagickMutex
static void LockMagickMutex(void)
Definition: mutex.h:63
SemaphoreComponentTerminus
MagickExport void SemaphoreComponentTerminus(void)
Definition: semaphore.c:422
MagickCoreSignature
#define MagickCoreSignature
Definition: method-attribute.h:86
pthread_mutexattr_init
#define pthread_mutexattr_init
Definition: vms.h:831
memory-private.h
MagickMutexType
size_t MagickMutexType
Definition: thread-private.h:55
DestroySemaphoreInfo
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **)
pthread_mutex_unlock
#define pthread_mutex_unlock
Definition: vms.h:826
MagickThreadType
pid_t MagickThreadType
Definition: thread_.h:34
SemaphoreInfo::mutex
MagickMutexType mutex
Definition: semaphore.c:63
string_.h
InitializeMagickMutex
static void InitializeMagickMutex(void)
Definition: mutex.h:55
pthread_mutex_lock
#define pthread_mutex_lock
Definition: vms.h:824
SemaphoreComponentGenesis
MagickExport MagickBooleanType SemaphoreComponentGenesis(void)
Definition: semaphore.c:398
MagickTrue
@ MagickTrue
Definition: magick-type.h:205
semaphore.h
UnlockMagickMutex
static void UnlockMagickMutex(void)
Definition: mutex.h:87
SemaphoreComponentTerminus
MagickExport void SemaphoreComponentTerminus(void)
thread-private.h
SemaphoreComponentGenesis
MagickExport MagickBooleanType SemaphoreComponentGenesis(void)
Definition: semaphore.c:398
LockSemaphoreInfo
MagickExport void LockSemaphoreInfo(SemaphoreInfo *)
FormatLocaleFile
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
Definition: locale.c:402
SemaphoreInfo
Definition: semaphore.c:61
pthread_mutex_destroy
#define pthread_mutex_destroy
Definition: vms.h:822
CACHE_LINE_SIZE
#define CACHE_LINE_SIZE
Definition: memory-private.h:30
pthread_mutex_init
#define pthread_mutex_init
Definition: vms.h:823
GetMagickThreadId
static MagickThreadType GetMagickThreadId(void)
Definition: thread-private.h:58
MagickFalse
@ MagickFalse
Definition: magick-type.h:204
semaphore-private.h
AllocateSemaphoreInfo
MagickExport SemaphoreInfo * AllocateSemaphoreInfo(void)
Definition: semaphore.c:192
pthread_mutexattr_destroy
#define pthread_mutexattr_destroy
Definition: vms.h:829
UnlockSemaphoreInfo
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *)
Definition: semaphore.c:449
SemaphoreInfo::id
MagickThreadType id
Definition: semaphore.c:66
AllocateSemaphoreInfo
MagickExport SemaphoreInfo * AllocateSemaphoreInfo(void)
Definition: semaphore.c:192
ActivateSemaphoreInfo
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:98
DestroySemaphoreInfo
MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info)
Definition: semaphore.c:351
MagickBooleanType
MagickBooleanType
Definition: magick-type.h:203
mutex.h
utility-private.h
studio.h
DestroyMagickMutex
static void DestroyMagickMutex(void)
Definition: mutex.h:47
memory_.h
AcquireSemaphoreMemory
static void * AcquireSemaphoreMemory(const size_t count, const size_t quantum)
Definition: semaphore.c:129
exception-private.h
ThrowFatalException
#define ThrowFatalException(severity, tag)
Definition: exception-private.h:42
UnlockSemaphoreInfo
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
Definition: semaphore.c:449
exception.h
RelinquishSemaphoreMemory
static void * RelinquishSemaphoreMemory(void *memory)
Definition: semaphore.c:178
ResourceLimitFatalError
@ ResourceLimitFatalError
Definition: exception.h:78
IsMagickThreadEqual
static MagickBooleanType IsMagickThreadEqual(const MagickThreadType id)
Definition: thread-private.h:93
thread_.h