MagickCore
7.0.0
|
#include "MagickCore/studio.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/semaphore-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/thread_.h"
#include "MagickCore/thread-private.h"
Go to the source code of this file.
Data Structures | |
struct | SemaphoreInfo |
Macros | |
#define | AlignedExtent(size, alignment) (((size)+((alignment)-1)) & ~((alignment)-1)) |
Functions | |
MagickExport void | AcquireSemaphoreInfo (SemaphoreInfo **semaphore_info) |
static void * | AcquireSemaphoreMemory (const size_t count, const size_t quantum) |
static void * | RelinquishSemaphoreMemory (void *memory) |
MagickExport SemaphoreInfo * | AllocateSemaphoreInfo (void) |
MagickExport void | DestroySemaphoreInfo (SemaphoreInfo **semaphore_info) |
MagickExport void | LockSemaphoreInfo (SemaphoreInfo *semaphore_info) |
MagickExport void | RelinquishSemaphoreInfo (SemaphoreInfo *semaphore_info) |
MagickPrivate MagickBooleanType | SemaphoreComponentGenesis (void) |
MagickPrivate void | SemaphoreComponentTerminus (void) |
MagickExport void | UnlockSemaphoreInfo (SemaphoreInfo *semaphore_info) |
#define AlignedExtent | ( | size, | |
alignment | |||
) | (((size)+((alignment)-1)) & ~((alignment)-1)) |
MagickExport void AcquireSemaphoreInfo | ( | SemaphoreInfo ** | semaphore_info | ) |
Definition at line 95 of file semaphore.c.
References AllocateSemaphoreInfo(), LockMagickMutex(), and UnlockMagickMutex().
Referenced by AcquireMagickMemory(), AcquireMagickResource(), AcquireUniqueFileResource(), AnnotateComponentGenesis(), AnnotateComponentTerminus(), CacheComponentGenesis(), CacheComponentTerminus(), CoderComponentGenesis(), CoderComponentTerminus(), ColorComponentGenesis(), ColorComponentTerminus(), ConfigureComponentGenesis(), ConfigureComponentTerminus(), ConstituteComponentGenesis(), ConstituteComponentTerminus(), DelegateComponentGenesis(), DelegateComponentTerminus(), DestroyExceptionInfo(), DestroyMagickMemory(), GetMagickResourceLimit(), InitializeCoderList(), InitializeColorList(), InitializeConfigureList(), InitializeDelegateList(), InitializeLocaleList(), InitializeLogList(), InitializeMagickList(), InitializeMagicList(), InitializeMimeList(), InitializePolicyList(), InitializeTypeList(), ListMagickResourceInfo(), LocaleComponentGenesis(), LocaleComponentTerminus(), LogComponentGenesis(), LogComponentTerminus(), MagicComponentGenesis(), MagicComponentTerminus(), MagickComponentGenesis(), MagickComponentTerminus(), MimeComponentGenesis(), MimeComponentTerminus(), PolicyComponentGenesis(), PolicyComponentTerminus(), RandomComponentGenesis(), RandomComponentTerminus(), ReadImage(), RegistryComponentGenesis(), RegistryComponentTerminus(), RelinquishMagickResource(), RenderX11(), ResourceComponentGenesis(), ResourceComponentTerminus(), SetImageRegistry(), SetMagickResourceLimit(), TypeComponentGenesis(), TypeComponentTerminus(), and WriteImage().
|
static |
Definition at line 126 of file semaphore.c.
References AlignedExtent, and CACHE_LINE_SIZE.
Referenced by AllocateSemaphoreInfo().
MagickExport SemaphoreInfo* AllocateSemaphoreInfo | ( | void | ) |
Definition at line 189 of file semaphore.c.
References AcquireSemaphoreMemory(), GetMagickThreadId(), SemaphoreInfo::id, MagickSignature, SemaphoreInfo::mutex, pthread_mutex_init, pthread_mutexattr_destroy, pthread_mutexattr_init, SemaphoreInfo::reference_count, ResetMagickMemory(), ResourceLimitFatalError, SemaphoreInfo::signature, and ThrowFatalException.
Referenced by AcquireImage(), AcquireRandomInfo(), AcquireSemaphoreInfo(), CloneImage(), GetBlobInfo(), GetExceptionInfo(), GetQuantumInfo(), NewHashmap(), NewLinkedList(), and NewSplayTree().
MagickExport void DestroySemaphoreInfo | ( | SemaphoreInfo ** | semaphore_info | ) |
Definition at line 288 of file semaphore.c.
References LockMagickMutex(), MagickSignature, pthread_mutex_destroy, RelinquishSemaphoreMemory(), and UnlockMagickMutex().
Referenced by AnnotateComponentTerminus(), CacheComponentTerminus(), CoderComponentTerminus(), ColorComponentTerminus(), ConfigureComponentTerminus(), ConstituteComponentTerminus(), DelegateComponentTerminus(), DestroyBlob(), DestroyExceptionInfo(), DestroyHashmap(), DestroyImage(), DestroyLinkedList(), DestroyMagickMemory(), DestroyPixelCache(), DestroyPixelStream(), DestroyQuantumInfo(), DestroyRandomInfo(), DestroySplayTree(), IncreaseHashmapCapacity(), LocaleComponentTerminus(), LogComponentTerminus(), MagicComponentTerminus(), MagickComponentTerminus(), MimeComponentTerminus(), PolicyComponentTerminus(), RandomComponentTerminus(), RegistryComponentTerminus(), ResourceComponentTerminus(), and TypeComponentTerminus().
MagickExport void LockSemaphoreInfo | ( | SemaphoreInfo * | semaphore_info | ) |
Definition at line 337 of file semaphore.c.
References FormatLocaleFile(), GetMagickThreadId(), SemaphoreInfo::id, IsMagickThreadEqual(), MagickFalse, MagickSignature, SemaphoreInfo::mutex, pthread_mutex_lock, SemaphoreInfo::reference_count, and SemaphoreInfo::signature.
Referenced by AcquireMagickMemory(), AcquireMagickResource(), AcquireUniqueFileResource(), AddValueToSplayTree(), AppendValueToLinkedList(), CacheComponentTerminus(), CatchException(), ClearLinkedList(), ClearMagickException(), CloneSplayTree(), CloseMagickLog(), CoderComponentTerminus(), ColorComponentTerminus(), ConfigureComponentTerminus(), DelegateComponentTerminus(), DeleteNodeByValueFromSplayTree(), DeleteNodeFromSplayTree(), DestroyBlob(), DestroyExceptionInfo(), DestroyHashmap(), DestroyImage(), DestroyLinkedList(), DestroyMagickMemory(), DestroyPixelCache(), DestroyPixelStream(), DestroyRandomInfo(), DestroySplayTree(), GenerateEntropicChaos(), GetCoderInfoList(), GetCoderList(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetImageMagick(), GetImageReferenceCount(), GetLastValueInLinkedList(), GetLocaleInfoList(), GetLocaleList(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagickInfo(), GetMagickInfoList(), GetMagickList(), GetMagickResource(), GetMagickResourceLimit(), GetMagicList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetNextKeyInHashmap(), GetNextKeyInSplayTree(), GetNextValueInHashmap(), GetNextValueInLinkedList(), GetNextValueInSplayTree(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), GetTypeInfoByFamily(), GetTypeInfoList(), GetTypeList(), GetValueFromHashmap(), GetValueFromLinkedList(), GetValueFromSplayTree(), IncreaseHashmapCapacity(), InheritException(), InitializeCoderList(), InitializeColorList(), InitializeConfigureList(), InitializeDelegateList(), InitializeLocaleList(), InitializeLogList(), InitializeMagickList(), InitializeMagicList(), InitializeMimeList(), InitializePolicyList(), InitializeTypeList(), InsertValueInLinkedList(), InsertValueInSortedLinkedList(), IsRightsAuthorized(), LinkedListToArray(), ListMagickResourceInfo(), LocaleComponentTerminus(), LogComponentTerminus(), LogMagickEventList(), MagicComponentTerminus(), MagickComponentTerminus(), MimeComponentTerminus(), ModifyImage(), PersistPixelCache(), PolicyComponentTerminus(), PutEntryInHashmap(), ReadImage(), ReadPixelCacheMetacontent(), ReadPixelCachePixels(), ReferenceBlob(), ReferenceImage(), ReferencePixelCache(), RegistryComponentTerminus(), RelinquishMagickMemory(), RelinquishMagickResource(), RemoveElementByValueFromLinkedList(), RemoveElementFromLinkedList(), RemoveEntryFromHashmap(), RemoveLastElementFromLinkedList(), RemoveNodeByValueFromSplayTree(), RemoveNodeFromSplayTree(), RenderX11(), ResetHashmapIterator(), ResetLinkedListIterator(), ResetSplayTree(), ResetSplayTreeIterator(), ResizeMagickMemory(), ResourceComponentTerminus(), SetImageRegistry(), SetLogEventMask(), SetLogFormat(), SetMagickResourceLimit(), SetRandomKey(), ThrowException(), TypeComponentTerminus(), UnregisterMagickInfo(), WriteImage(), WritePixelCacheMetacontent(), and WritePixelCachePixels().
MagickExport void RelinquishSemaphoreInfo | ( | SemaphoreInfo * | semaphore_info | ) |
Definition at line 391 of file semaphore.c.
References MagickSignature, SemaphoreInfo::signature, and UnlockSemaphoreInfo().
|
static |
Definition at line 175 of file semaphore.c.
Referenced by DestroySemaphoreInfo().
MagickPrivate MagickBooleanType SemaphoreComponentGenesis | ( | void | ) |
Definition at line 416 of file semaphore.c.
References LockMagickMutex(), MagickTrue, and UnlockMagickMutex().
Referenced by MagickCoreGenesis().
MagickPrivate void SemaphoreComponentTerminus | ( | void | ) |
Definition at line 441 of file semaphore.c.
Referenced by MagickCoreTerminus().
MagickExport void UnlockSemaphoreInfo | ( | SemaphoreInfo * | semaphore_info | ) |
Definition at line 467 of file semaphore.c.
References FormatLocaleFile(), SemaphoreInfo::id, IsMagickThreadEqual(), MagickFalse, MagickSignature, SemaphoreInfo::mutex, pthread_mutex_unlock, SemaphoreInfo::reference_count, and SemaphoreInfo::signature.
Referenced by AcquireMagickMemory(), AcquireMagickResource(), AcquireUniqueFileResource(), AddValueToSplayTree(), AppendValueToLinkedList(), CacheComponentTerminus(), CatchException(), ClearLinkedList(), ClearMagickException(), CloneSplayTree(), CloseMagickLog(), CoderComponentTerminus(), ColorComponentTerminus(), ConfigureComponentTerminus(), DelegateComponentTerminus(), DeleteNodeByValueFromSplayTree(), DeleteNodeFromSplayTree(), DestroyBlob(), DestroyExceptionInfo(), DestroyHashmap(), DestroyImage(), DestroyLinkedList(), DestroyMagickMemory(), DestroyPixelCache(), DestroyPixelStream(), DestroyRandomInfo(), DestroySplayTree(), GenerateEntropicChaos(), GetCoderInfoList(), GetCoderList(), GetColorCompliance(), GetColorInfoList(), GetColorList(), GetConfigureInfo(), GetConfigureInfoList(), GetConfigureList(), GetDelegateInfo(), GetDelegateInfoList(), GetDelegateList(), GetImageMagick(), GetImageReferenceCount(), GetLastValueInLinkedList(), GetLocaleInfoList(), GetLocaleList(), GetLogInfo(), GetLogInfoList(), GetLogList(), GetMagicInfo(), GetMagicInfoList(), GetMagickInfo(), GetMagickInfoList(), GetMagickList(), GetMagickResource(), GetMagickResourceLimit(), GetMagicList(), GetMimeInfo(), GetMimeInfoList(), GetMimeList(), GetNextKeyInHashmap(), GetNextKeyInSplayTree(), GetNextValueInHashmap(), GetNextValueInLinkedList(), GetNextValueInSplayTree(), GetPolicyInfo(), GetPolicyInfoList(), GetPolicyList(), GetTypeInfoByFamily(), GetTypeInfoList(), GetTypeList(), GetValueFromHashmap(), GetValueFromLinkedList(), GetValueFromSplayTree(), IncreaseHashmapCapacity(), InheritException(), InitializeCoderList(), InitializeColorList(), InitializeConfigureList(), InitializeDelegateList(), InitializeLocaleList(), InitializeLogList(), InitializeMagickList(), InitializeMagicList(), InitializeMimeList(), InitializePolicyList(), InitializeTypeList(), InsertValueInLinkedList(), InsertValueInSortedLinkedList(), IsRightsAuthorized(), LinkedListToArray(), ListMagickResourceInfo(), LocaleComponentTerminus(), LogComponentTerminus(), LogMagickEventList(), MagicComponentTerminus(), MagickComponentTerminus(), MimeComponentTerminus(), ModifyImage(), PersistPixelCache(), PolicyComponentTerminus(), PutEntryInHashmap(), ReadImage(), ReadPixelCacheMetacontent(), ReadPixelCachePixels(), ReferenceBlob(), ReferenceImage(), ReferencePixelCache(), RegistryComponentTerminus(), RelinquishMagickMemory(), RelinquishMagickResource(), RelinquishSemaphoreInfo(), RemoveElementByValueFromLinkedList(), RemoveElementFromLinkedList(), RemoveEntryFromHashmap(), RemoveLastElementFromLinkedList(), RemoveNodeByValueFromSplayTree(), RemoveNodeFromSplayTree(), RenderX11(), ResetHashmapIterator(), ResetLinkedListIterator(), ResetSplayTree(), ResetSplayTreeIterator(), ResizeMagickMemory(), ResourceComponentTerminus(), SetImageRegistry(), SetLogEventMask(), SetLogFormat(), SetMagickResourceLimit(), SetRandomKey(), ThrowException(), TypeComponentTerminus(), UnregisterMagickInfo(), WriteImage(), WritePixelCacheMetacontent(), and WritePixelCachePixels().