]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/hashmap.c
(no commit message)
[imagemagick] / MagickCore / hashmap.c
index 1b4de4fc58b82a00b565d90ec3e8a0f2df2b9111..28bbad6f3549af4b4826335dc5c0b65b3ba975b5 100644 (file)
 %                  MagickCore Hash-map and Linked-list Methods                %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                               December 2002                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -358,7 +358,7 @@ MagickExport HashmapInfo *DestroyHashmap(HashmapInfo *hashmap_info)
     hashmap_info->map);
   hashmap_info->signature=(~MagickSignature);
   UnlockSemaphoreInfo(hashmap_info->semaphore);
-  DestroySemaphoreInfo(&hashmap_info->semaphore);
+  RelinquishSemaphoreInfo(&hashmap_info->semaphore);
   hashmap_info=(HashmapInfo *) RelinquishMagickMemory(hashmap_info);
   return(hashmap_info);
 }
@@ -411,7 +411,7 @@ MagickExport LinkedListInfo *DestroyLinkedList(LinkedListInfo *list_info,
   }
   list_info->signature=(~MagickSignature);
   UnlockSemaphoreInfo(list_info->semaphore);
-  DestroySemaphoreInfo(&list_info->semaphore);
+  RelinquishSemaphoreInfo(&list_info->semaphore);
   list_info=(LinkedListInfo *) RelinquishMagickMemory(list_info);
   return(list_info);
 }
@@ -1326,7 +1326,7 @@ MagickExport HashmapInfo *NewHashmap(const size_t capacity,
     ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(hashmap_info->map,0,(size_t) capacity*
     sizeof(*hashmap_info->map));
-  hashmap_info->semaphore=AllocateSemaphoreInfo();
+  hashmap_info->semaphore=AcquireSemaphoreInfo();
   hashmap_info->signature=MagickSignature;
   return(hashmap_info);
 }
@@ -1368,7 +1368,7 @@ MagickExport LinkedListInfo *NewLinkedList(const size_t capacity)
   list_info->head=(ElementInfo *) NULL;
   list_info->tail=(ElementInfo *) NULL;
   list_info->next=(ElementInfo *) NULL;
-  list_info->semaphore=AllocateSemaphoreInfo();
+  list_info->semaphore=AcquireSemaphoreInfo();
   list_info->signature=MagickSignature;
   return(list_info);
 }
@@ -1474,7 +1474,7 @@ static MagickBooleanType IncreaseHashmapCapacity(HashmapInfo *hashmap_info)
     }
     list_info->signature=(~MagickSignature);
     UnlockSemaphoreInfo(list_info->semaphore);
-    DestroySemaphoreInfo(&list_info->semaphore);
+    RelinquishSemaphoreInfo(&list_info->semaphore);
     list_info=(LinkedListInfo *) RelinquishMagickMemory(list_info);
   }
   hashmap_info->map=(LinkedListInfo **) RelinquishMagickMemory(