这篇教程C++ AcquireSemaphoreInfo函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AcquireSemaphoreInfo函数的典型用法代码示例。如果您正苦于以下问题:C++ AcquireSemaphoreInfo函数的具体用法?C++ AcquireSemaphoreInfo怎么用?C++ AcquireSemaphoreInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AcquireSemaphoreInfo函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ListMagickResourceInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% L i s t M a g i c k R e s o u r c e I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ListMagickResourceInfo() lists the resource info to a file.%% The format of the ListMagickResourceInfo method is:%% MagickBooleanType ListMagickResourceInfo(FILE *file,% ExceptionInfo *exception)%% A description of each parameter follows.%% o file: An pointer to a FILE.%% o exception: Return any errors or warnings in this structure.%*/MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file, ExceptionInfo *magick_unused(exception)){ char area_limit[MaxTextExtent], disk_limit[MaxTextExtent], map_limit[MaxTextExtent], memory_limit[MaxTextExtent]; if (file == (const FILE *) NULL) file=stdout; AcquireSemaphoreInfo(&resource_semaphore); (void) FormatMagickSize(MegabytesToBytes(resource_info.area_limit), area_limit); (void) FormatMagickSize(GigabytesToBytes(resource_info.disk_limit), disk_limit); (void) FormatMagickSize(MegabytesToBytes(resource_info.map_limit),map_limit); (void) FormatMagickSize(MegabytesToBytes(resource_info.memory_limit), memory_limit); (void) fprintf(file,"File Area Memory Map Disk/n"); (void) fprintf(file,"------------------------------------------------/n"); (void) fprintf(file,"%4lu %9s %9s %9s %9s/n",resource_info.file_limit, area_limit,memory_limit,map_limit,disk_limit); (void) fflush(file); RelinquishSemaphoreInfo(resource_semaphore); return(MagickTrue);}
开发者ID:vazexqi,项目名称:ParsecPipelineParallelism,代码行数:52,
示例2: assert/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ G e t C o d e r I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetCoderInfo searches the coder list for the specified name and if found% returns attributes for that coder.%% The format of the GetCoderInfo method is:%% const CoderInfo *GetCoderInfo(const char *name,ExceptionInfo *exception)%% A description of each parameter follows:%% o name: The coder name.%% o exception: Return any errors or warnings in this structure.%%*/MagickExport const CoderInfo *GetCoderInfo(const char *name, ExceptionInfo *exception){ register const CoderInfo *p; assert(exception != (ExceptionInfo *) NULL); if ((coder_list == (SplayTreeInfo *) NULL) || (instantiate_coder == MagickFalse)) if (InitializeCoderList(exception) == MagickFalse) return((const CoderInfo *) NULL); if ((coder_list == (SplayTreeInfo *) NULL) || (GetNumberOfNodesInSplayTree(coder_list) == 0)) return((const CoderInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) { ResetSplayTreeIterator(coder_list); return((const CoderInfo *) GetNextValueInSplayTree(coder_list)); } /* Search for requested coder. */ AcquireSemaphoreInfo(&coder_semaphore); ResetSplayTreeIterator(coder_list); p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); while (p != (const CoderInfo *) NULL) { if (LocaleCompare(name,p->magick) == 0) break; p=(const CoderInfo *) GetNextValueInSplayTree(coder_list); } RelinquishSemaphoreInfo(coder_semaphore); return(p);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:60,
示例3: GetLocaleInfo_/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ G e t L o c a l e I n f o _ %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetLocaleInfo_() searches the locale list for the specified tag and if% found returns attributes for that element.%% The format of the GetLocaleInfo method is:%% const LocaleInfo *GetLocaleInfo_(const char *tag,% ExceptionInfo *exception)%% A description of each parameter follows:%% o tag: The locale tag.%% o exception: Return any errors or warnings in this structure.%%*/MagickExport const LocaleInfo *GetLocaleInfo_(const char *tag, ExceptionInfo *exception){ register const LocaleInfo *p; assert(exception != (ExceptionInfo *) NULL); if ((locale_list == (SplayTreeInfo *) NULL) || (instantiate_locale == MagickFalse)) if (InitializeLocaleList(exception) == MagickFalse) return((const LocaleInfo *) NULL); if ((locale_list == (SplayTreeInfo *) NULL) || (GetNumberOfNodesInSplayTree(locale_list) == 0)) return((const LocaleInfo *) NULL); if ((tag == (const char *) NULL) || (LocaleCompare(tag,"*") == 0)) { ResetSplayTreeIterator(locale_list); return((const LocaleInfo *) GetNextValueInSplayTree(locale_list)); } /* Search for named tag. */ AcquireSemaphoreInfo(&locale_semaphore); ResetSplayTreeIterator(locale_list); p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); while (p != (const LocaleInfo *) NULL) { if (LocaleCompare(tag,p->tag) == 0) break; p=(const LocaleInfo *) GetNextValueInSplayTree(locale_list); } RelinquishSemaphoreInfo(locale_semaphore); return(p);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:61,
示例4: InitializeLocaleList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ I n i t i a l i z e L o c a l e L i s t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitializeLocaleList() initializes the locale list.%% The format of the InitializeLocaleList method is:%% MagickBooleanType InitializeLocaleList(ExceptionInfo *exception)%% A description of each parameter follows.%% o exception: Return any errors or warnings in this structure.%*/static MagickBooleanType InitializeLocaleList(ExceptionInfo *exception){ if ((locale_list == (SplayTreeInfo *) NULL) && (instantiate_locale == MagickFalse)) { AcquireSemaphoreInfo(&locale_semaphore); if ((locale_list == (SplayTreeInfo *) NULL) && (instantiate_locale == MagickFalse)) { char *locale; locale=setlocale(LC_CTYPE,0); if ((locale == (char *) NULL) || (*locale == '/0')) locale=getenv("LC_ALL"); if ((locale == (char *) NULL) || (*locale == '/0')) locale=getenv("LC_MESSAGES"); if ((locale == (char *) NULL) || (*locale == '/0')) locale=getenv("LC_CTYPE"); if ((locale == (char *) NULL) || (*locale == '/0')) locale=getenv("LANG"); if ((locale == (char *) NULL) || (*locale == '/0')) locale="C"; (void) LoadLocaleLists(LocaleFilename,locale,exception); instantiate_locale=MagickTrue; } RelinquishSemaphoreInfo(locale_semaphore); } return((MagickBooleanType) (locale_list != (SplayTreeInfo *) NULL));}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:52,
示例5: returnMagickExport void *ResizeMagickMemory(void *memory,const size_t size){ register void *block; if (memory == (void *) NULL) return(AcquireMagickMemory(size));#if !defined(MAGICKCORE_EMBEDDABLE_SUPPORT) block=memory_methods.resize_memory_handler(memory,size == 0 ? 1UL : size); if (block == (void *) NULL) memory=RelinquishMagickMemory(memory);#else AcquireSemaphoreInfo(&memory_semaphore); block=ResizeBlock(memory,size == 0 ? 1UL : size); if (block == (void *) NULL) { if (ExpandHeap(size == 0 ? 1UL : size) == MagickFalse) { RelinquishSemaphoreInfo(memory_semaphore); memory=RelinquishMagickMemory(memory); ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); } block=ResizeBlock(memory,size == 0 ? 1UL : size); assert(block != (void *) NULL); } RelinquishSemaphoreInfo(memory_semaphore); memory=RelinquishMagickMemory(memory);#endif return(block);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:30,
示例6: returnMagickExport void *ResizeMagickMemory(void *memory,const size_t size){ register void *block; if (memory == (void *) NULL) return(AcquireMagickMemory(size));#if !defined(UseEmbeddableMagick) block=realloc(memory,size == 0 ? 1UL : size);#else AcquireSemaphoreInfo(&memory_semaphore); block=ResizeBlock(memory,size == 0 ? 1UL : size); if (block == (void *) NULL) { if (ExpandHeap(size == 0 ? 1UL : size) == MagickFalse) { RelinquishSemaphoreInfo(memory_semaphore); memory=RelinquishMagickMemory(memory); ThrowMagickFatalException(ResourceLimitFatalError, "MemoryAllocationFailed",strerror(errno)); } block=ResizeBlock(memory,size == 0 ? 1UL : size); assert(block != (void *) NULL); } RelinquishSemaphoreInfo(memory_semaphore);#endif if (block == (void *) NULL) memory=RelinquishMagickMemory(memory); return(block);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:30,
示例7: DestroyMagickResources/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ D e s t r o y M a g i c k R e s o u r c e s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyMagickResources() destroys the resource environment.%% The format of the DestroyMagickResources() method is:%% DestroyMagickResources(void)%*/MagickExport void DestroyMagickResources(void){ AcquireSemaphoreInfo(&resource_semaphore); if (temporary_resources != (SplayTreeInfo *) NULL) temporary_resources=DestroySplayTree(temporary_resources); RelinquishSemaphoreInfo(resource_semaphore); resource_semaphore=DestroySemaphoreInfo(resource_semaphore);}
开发者ID:vazexqi,项目名称:ParsecPipelineParallelism,代码行数:26,
示例8: DestroyLocaleList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ D e s t r o y L o c a l e L i s t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyLocaleList() deallocates memory associated with the locale list.%% The format of the DestroyLocaleList method is:%% DestroyLocaleList(void)%%*/MagickExport void DestroyLocaleList(void){ AcquireSemaphoreInfo(&locale_semaphore); if (locale_list != (SplayTreeInfo *) NULL) locale_list=DestroySplayTree(locale_list); instantiate_locale=MagickFalse; RelinquishSemaphoreInfo(locale_semaphore); locale_semaphore=DestroySemaphoreInfo(locale_semaphore);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:28,
示例9: InitializeExceptionInfo/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% I n i t i a l i z e t E x c e p t i o n I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitializeExceptionInfo() initializes an exception to default values.%% The format of the InitializeExceptionInfo method is:%% InitializeExceptionInfo(ExceptionInfo *exception)%% A description of each parameter follows:%% o exception: the exception info.%*/MagickPrivate void InitializeExceptionInfo(ExceptionInfo *exception){ assert(exception != (ExceptionInfo *) NULL); (void) ResetMagickMemory(exception,0,sizeof(*exception)); exception->severity=UndefinedException; exception->exceptions=(void *) NewLinkedList(0); exception->semaphore=AcquireSemaphoreInfo(); exception->signature=MagickCoreSignature;}
开发者ID:JimBobSquarePants,项目名称:ImageMagick,代码行数:31,
示例10: DestroyCoderList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ D e s t r o y C o d e r L i s t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyCoderList() deallocates memory associated with the font list.%% The format of the DestroyCoderList method is:%% DestroyCoderList(void)%%*/MagickExport void DestroyCoderList(void){ AcquireSemaphoreInfo(&coder_semaphore); if (coder_list != (SplayTreeInfo *) NULL) coder_list=DestroySplayTree(coder_list); instantiate_coder=MagickFalse; RelinquishSemaphoreInfo(coder_semaphore); coder_semaphore=DestroySemaphoreInfo(coder_semaphore);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:28,
示例11: DestroyTypeList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ D e s t r o y T y p e L i s t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyTypeList() deallocates memory associated with the font list.%% The format of the DestroyTypeList method is:%% DestroyTypeList(void)%*/MagickExport void DestroyTypeList(void){ AcquireSemaphoreInfo(&type_semaphore); if (type_list != (SplayTreeInfo *) NULL) type_list=DestroySplayTree(type_list); instantiate_type=MagickFalse; RelinquishSemaphoreInfo(type_semaphore); type_semaphore=DestroySemaphoreInfo(type_semaphore);}
开发者ID:vazexqi,项目名称:ParsecPipelineParallelism,代码行数:27,
示例12: GetMagickResourceLimit/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% G e t M a g i c k R e s o u r c e L i m i t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetMagickResourceLimit() returns the specified resource limit.%% The format of the GetMagickResourceLimit() method is:%% MagickSizeType GetMagickResourceLimit(const ResourceType type)%% A description of each parameter follows:%% o type: the type of resource.%*/MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type){ MagickSizeType resource; resource=0; if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: { resource=resource_info.area_limit; break; } case MemoryResource: { resource=resource_info.memory_limit; break; } case MapResource: { resource=resource_info.map_limit; break; } case DiskResource: { resource=resource_info.disk_limit; break; } case FileResource: { resource=resource_info.file_limit; break; } case ThreadResource: { resource=resource_info.thread_limit; break; } case ThrottleResource: { resource=resource_info.throttle_limit; break; } case TimeResource: { resource=resource_info.time_limit; break; } default: break; } UnlockSemaphoreInfo(resource_semaphore); return(resource);}
开发者ID:abhishek-sharma,项目名称:ImageMagick,代码行数:79,
示例13: AcquireMagickMemory/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% A c q u i r e M a g i c k M e m o r y %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% AcquireMagickMemory() returns a pointer to a block of memory at least size% bytes suitably aligned for any use.%% The format of the AcquireMagickMemory method is:%% void *AcquireMagickMemory(const size_t size)%% A description of each parameter follows:%% o size: the size of the memory in bytes to allocate.%*/MagickExport void *AcquireMagickMemory(const size_t size){ register void *memory;#if !defined(MAGICKCORE_EMBEDDABLE_SUPPORT) memory=memory_methods.acquire_memory_handler(size == 0 ? 1UL : size);#else if (free_segments == (DataSegmentInfo *) NULL) { AcquireSemaphoreInfo(&memory_semaphore); if (free_segments == (DataSegmentInfo *) NULL) { register long i; assert(2*sizeof(size_t) > (size_t) (~SizeMask)); (void) ResetMagickMemory(&memory_info,0,sizeof(memory_info)); memory_info.allocation=SegmentSize; memory_info.blocks[MaxBlocks]=(void *) (-1); for (i=0; i < MaxSegments; i++) { if (i != 0) memory_info.segment_pool[i].previous= (&memory_info.segment_pool[i-1]); if (i != (MaxSegments-1)) memory_info.segment_pool[i].next=(&memory_info.segment_pool[i+1]); } free_segments=(&memory_info.segment_pool[0]); } RelinquishSemaphoreInfo(memory_semaphore); } AcquireSemaphoreInfo(&memory_semaphore); memory=AcquireBlock(size == 0 ? 1UL : size); if (memory == (void *) NULL) { if (ExpandHeap(size == 0 ? 1UL : size) != MagickFalse) memory=AcquireBlock(size == 0 ? 1UL : size); } RelinquishSemaphoreInfo(memory_semaphore);#endif return(memory);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:66,
示例14: RelinquishMagickResource/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% R e l i n q u i s h M a g i c k R e s o u r c e %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RelinquishMagickResource() relinquishes resources of the specified type.%% The format of the RelinquishMagickResource() method is:%% void RelinquishMagickResource(const ResourceType type,% const MagickSizeType size)%% A description of each parameter follows:%% o type: The type of resource.%% o size: The size of the resource.%%*/MagickExport void RelinquishMagickResource(const ResourceType type, const MagickSizeType size){ char resource_current[MaxTextExtent], resource_limit[MaxTextExtent], resource_request[MaxTextExtent]; FormatSize(size,resource_request); AcquireSemaphoreInfo(&resource_semaphore); switch (type) { case AreaResource: { resource_info.area=size; FormatSize((MagickSizeType) resource_info.area,resource_current); FormatSize(MegabytesToBytes(resource_info.area_limit),resource_limit); break; } case MemoryResource: { resource_info.memory-=size; FormatSize((MagickSizeType) resource_info.memory,resource_current); FormatSize(MegabytesToBytes(resource_info.memory_limit),resource_limit); break; } case MapResource: { resource_info.map-=size; FormatSize((MagickSizeType) resource_info.map,resource_current); FormatSize(MegabytesToBytes(resource_info.map_limit),resource_limit); break; } case DiskResource: { resource_info.disk-=size; FormatSize((MagickSizeType) resource_info.disk,resource_current); FormatSize(GigabytesToBytes(resource_info.disk_limit),resource_limit); break; } case FileResource: { resource_info.file-=size; FormatSize((MagickSizeType) resource_info.file,resource_current); FormatSize((MagickSizeType) resource_info.file_limit,resource_limit); break; } default: break; } RelinquishSemaphoreInfo(resource_semaphore); (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s", MagickOptionToMnemonic(MagickResourceOptions,(long) type),resource_request, resource_current,resource_limit);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:81,
示例15: LocaleComponentTerminus/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ L o c a l e C o m p o n e n t T e r m i n u s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocaleComponentTerminus() destroys the locale component.%% The format of the LocaleComponentTerminus method is:%% LocaleComponentTerminus(void)%*/MagickExport void LocaleComponentTerminus(void){ if (locale_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&locale_semaphore); LockSemaphoreInfo(locale_semaphore); if (locale_list != (SplayTreeInfo *) NULL) locale_list=DestroySplayTree(locale_list); instantiate_locale=MagickFalse; UnlockSemaphoreInfo(locale_semaphore); DestroySemaphoreInfo(&locale_semaphore);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:29,
示例16: TypeComponentTerminus/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ T y p e C o m p o n e n t T e r m i n u s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TypeComponentTerminus() destroy type component.%% The format of the TypeComponentTerminus method is:%% void TypeComponentTerminus(void)%*/MagickPrivate void TypeComponentTerminus(void){ if (type_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&type_semaphore); LockSemaphoreInfo(type_semaphore); if (type_list != (SplayTreeInfo *) NULL) type_list=DestroySplayTree(type_list); instantiate_type=MagickFalse; UnlockSemaphoreInfo(type_semaphore); DestroySemaphoreInfo(&type_semaphore);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:29,
示例17: DestroyWandIds/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% D e s t r o y W a n d I d s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DestroyWandIds() deallocates memory associated with the wand id's.%% The format of the DestroyWandIds() method is:%% void DestroyWandIds(void)%% A description of each parameter follows:%*/WandExport void DestroyWandIds(void){ if (wand_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&wand_semaphore); LockSemaphoreInfo(wand_semaphore); if (wand_ids != (SplayTreeInfo *) NULL) wand_ids=DestroySplayTree(wand_ids); instantiate_wand=MagickFalse; UnlockSemaphoreInfo(wand_semaphore); DestroySemaphoreInfo(&wand_semaphore);}
开发者ID:ChaseReid,项目名称:ImageMagick,代码行数:31,
示例18: CoderComponentTerminus/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ C o d e r C o m p o n e n t T e r m i n u s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CoderComponentTerminus() destroys the coder component.%% The format of the CoderComponentTerminus method is:%% CoderComponentTerminus(void)%*/MagickPrivate void CoderComponentTerminus(void){ if (coder_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&coder_semaphore); LockSemaphoreInfo(coder_semaphore); if (coder_list != (SplayTreeInfo *) NULL) coder_list=DestroySplayTree(coder_list); instantiate_coder=MagickFalse; UnlockSemaphoreInfo(coder_semaphore); DestroySemaphoreInfo(&coder_semaphore);}
开发者ID:abhishek-sharma,项目名称:ImageMagick,代码行数:29,
示例19: PolicyComponentTerminusMagickExport void PolicyComponentTerminus(void){ if (policy_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&policy_semaphore); LockSemaphoreInfo(policy_semaphore); if (policy_list != (LinkedListInfo *) NULL) policy_list=DestroyLinkedList(policy_list,DestroyPolicyElement); instantiate_policy=MagickFalse; UnlockSemaphoreInfo(policy_semaphore); DestroySemaphoreInfo(&policy_semaphore);}
开发者ID:AlexiaChen,项目名称:ImageMagick_Cmake,代码行数:11,
示例20: MagicComponentTerminusMagickExport void MagicComponentTerminus(void){ if (magic_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&magic_semaphore); LockSemaphoreInfo(magic_semaphore); if (magic_list != (LinkedListInfo *) NULL) magic_list=DestroyLinkedList(magic_list,DestroyMagicElement); instantiate_magic=MagickFalse; UnlockSemaphoreInfo(magic_semaphore); DestroySemaphoreInfo(&magic_semaphore);}
开发者ID:alessio-ragni,项目名称:unix-toolbox.js-imagemagick,代码行数:11,
示例21: MimeComponentTerminusMagickPrivate void MimeComponentTerminus(void){ if (mime_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&mime_semaphore); LockSemaphoreInfo(mime_semaphore); if (mime_list != (LinkedListInfo *) NULL) mime_list=DestroyLinkedList(mime_list,DestroyMimeElement); instantiate_mime=MagickFalse; UnlockSemaphoreInfo(mime_semaphore); DestroySemaphoreInfo(&mime_semaphore);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:11,
示例22: ConfigureComponentTerminusMagickExport void ConfigureComponentTerminus(void){ if (configure_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&configure_semaphore); LockSemaphoreInfo(configure_semaphore); if (configure_list != (LinkedListInfo *) NULL) configure_list=DestroyLinkedList(configure_list,DestroyConfigureElement); configure_list=(LinkedListInfo *) NULL; instantiate_configure=MagickFalse; UnlockSemaphoreInfo(configure_semaphore); DestroySemaphoreInfo(&configure_semaphore);}
开发者ID:MaximOrlovsky,项目名称:unix-toolbox.js-imagemagick,代码行数:12,
示例23: RegistryComponentTerminus/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% R e g i s t r y C o m p o n e n t T e r m i n u s %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RegistryComponentTerminus() destroys the registry component.%% The format of the DestroyDefines method is:%% void RegistryComponentTerminus(void)%*/MagickPrivate void RegistryComponentTerminus(void){ if (registry_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(®istry_semaphore); LockSemaphoreInfo(registry_semaphore); if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); if (registry != (void *) NULL) registry=DestroySplayTree(registry); instantiate_registry=MagickFalse; UnlockSemaphoreInfo(registry_semaphore); DestroySemaphoreInfo(®istry_semaphore);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:31,
示例24: SetMagickResourceLimit/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% S e t M a g i c k R e s o u r c e L i m i t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetMagickResourceLimit() sets the limit for a particular resource.%% The format of the SetMagickResourceLimit() method is:%% MagickBooleanType SetMagickResourceLimit(const ResourceType type,% const MagickSizeType limit)%% A description of each parameter follows:%% o type: the type of resource.%% o limit: the maximum limit for the resource.%*/MagickExport MagickBooleanType SetMagickResourceLimit(const ResourceType type, const MagickSizeType limit){ if (resource_semaphore == (SemaphoreInfo *) NULL) AcquireSemaphoreInfo(&resource_semaphore); LockSemaphoreInfo(resource_semaphore); switch (type) { case AreaResource: { resource_info.area_limit=limit; break; } case MemoryResource: { resource_info.memory_limit=limit; break; } case MapResource: { resource_info.map_limit=limit; break; } case DiskResource: { resource_info.disk_limit=limit; break; } case FileResource: { resource_info.file_limit=limit; break; } case ThreadResource: { SetOpenMPMaximumThreads((int) limit); resource_info.thread_limit=limit; break; } case TimeResource: { resource_info.time_limit=limit; break; } default: break; } UnlockSemaphoreInfo(resource_semaphore); return(MagickTrue);}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:75,
示例25: InitializeCoderList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %+ I n i t i a l i z e C o d e r L i s t %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitializeCoderList() initializes the coder list.%% The format of the InitializeCoderList method is:%% MagickBooleanType InitializeCoderList(ExceptionInfo *exception)%% A description of each parameter follows.%% o exception: Return any errors or warnings in this structure.%*/static MagickBooleanType InitializeCoderList(ExceptionInfo *exception){ if ((coder_list == (SplayTreeInfo *) NULL) && (instantiate_coder == MagickFalse)) { AcquireSemaphoreInfo(&coder_semaphore); if ((coder_list == (SplayTreeInfo *) NULL) && (instantiate_coder == MagickFalse)) { (void) LoadCoderLists(MagickCoderFilename,exception); instantiate_coder=MagickTrue; } RelinquishSemaphoreInfo(coder_semaphore); } return(coder_list != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse);}
开发者ID:miettal,项目名称:armadillo420_standard,代码行数:38,
示例26: NewLinkedList/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% %% N e w L i n k e d L i s t I n f o %% %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NewLinkedList() returns a pointer to a LinkedListInfo structure% initialized to default values.%% The format of the NewLinkedList method is:%% LinkedListInfo *NewLinkedList(const size_t capacity)%% A description of each parameter follows:%% o capacity: the maximum number of elements in the list.%*/MagickExport LinkedListInfo *NewLinkedList(const size_t capacity){ LinkedListInfo *list_info; list_info=(LinkedListInfo *) AcquireCriticalMemory(sizeof(*list_info)); (void) ResetMagickMemory(list_info,0,sizeof(*list_info)); list_info->capacity=capacity == 0 ? (size_t) (~0) : capacity; list_info->elements=0; list_info->head=(ElementInfo *) NULL; list_info->tail=(ElementInfo *) NULL; list_info->next=(ElementInfo *) NULL; list_info->semaphore=AcquireSemaphoreInfo(); list_info->signature=MagickCoreSignature; return(list_info);}
开发者ID:vcgato29,项目名称:ImageMagick,代码行数:39,
注:本文中的AcquireSemaphoreInfo函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AcquireString函数代码示例 C++ AcquireSRWLockExclusive函数代码示例 |