]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 16 Mar 2014 21:26:40 +0000 (21:26 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 16 Mar 2014 21:26:40 +0000 (21:26 +0000)
14 files changed:
MagickCore/constitute-private.h
MagickCore/constitute.c
MagickCore/delegate.c
MagickCore/delegate.h
MagickCore/locale.c
MagickCore/magick.c
MagickCore/magick.h
MagickCore/matrix.h
MagickCore/semaphore.c
MagickCore/semaphore.h
MagickCore/type.c
coders/jp2.c
coders/jpeg.c
coders/tiff.c

index 77bfae220b26ed88268c369f6fa3a8bf7f1082be..b725e254a03b981635e6ee6db433963641ab7a02 100644 (file)
 extern "C" {
 #endif
 
-extern MagickPrivate MagickBooleanType
-  ConstituteComponentGenesis(void);
-
-extern MagickPrivate void
-  ConstituteComponentTerminus(void);
-
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif
index ca465349697f8f3ea73fc03c74341714735c8ff6..b69426a769e44b97fd86370a26c3eaaae306b4c5 100644 (file)
 #include "MagickCore/utility.h"
 #include "MagickCore/utility-private.h"
 \f
-static SemaphoreInfo
-  *constitute_semaphore = (SemaphoreInfo *) NULL;
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
-+   C o n s t i t u t e C o m p o n e n t G e n e s i s                       %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  ConstituteComponentGenesis() instantiates the constitute component.
-%
-%  The format of the ConstituteComponentGenesis method is:
-%
-%      MagickBooleanType ConstituteComponentGenesis(void)
-%
-*/
-MagickPrivate MagickBooleanType ConstituteComponentGenesis(void)
-{
-  constitute_semaphore=AcquireSemaphoreInfo();
-  return(MagickTrue);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
-+   C o n s t i t u t e C o m p o n e n t T e r m i n u s                     %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  ConstituteComponentTerminus() destroys the constitute component.
-%
-%  The format of the ConstituteComponentTerminus method is:
-%
-%      ConstituteComponentTerminus(void)
-%
-*/
-MagickPrivate void ConstituteComponentTerminus(void)
-{
-  if (constitute_semaphore == (SemaphoreInfo *) NULL)
-    ActivateSemaphoreInfo(&constitute_semaphore);
-  RelinquishSemaphoreInfo(&constitute_semaphore);
-}
-\f
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
@@ -527,8 +475,6 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
       image=DestroyImage(image);
     }
   image=NewImageList();
-  if (constitute_semaphore == (SemaphoreInfo *) NULL)
-    ActivateSemaphoreInfo(&constitute_semaphore);
   if ((magick_info == (const MagickInfo *) NULL) ||
       (GetImageDecoder(magick_info) == (DecodeImageHandler *) NULL))
     {
@@ -545,10 +491,10 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
     {
       thread_support=GetMagickThreadSupport(magick_info);
       if ((thread_support & DecoderThreadSupport) == 0)
-        LockSemaphoreInfo(constitute_semaphore);
+        LockSemaphoreInfo(magick_info->semaphore);
       image=GetImageDecoder(magick_info)(read_info,exception);
       if ((thread_support & DecoderThreadSupport) == 0)
-        UnlockSemaphoreInfo(constitute_semaphore);
+        UnlockSemaphoreInfo(magick_info->semaphore);
     }
   else
     {
@@ -576,11 +522,11 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
         MaxTextExtent);
       *read_info->filename='\0';
       if (GetDelegateThreadSupport(delegate_info) == MagickFalse)
-        LockSemaphoreInfo(constitute_semaphore);
+        LockSemaphoreInfo(delegate_info->semaphore);
       (void) InvokeDelegate(read_info,image,read_info->magick,(char *) NULL,
         exception);
       if (GetDelegateThreadSupport(delegate_info) == MagickFalse)
-        UnlockSemaphoreInfo(constitute_semaphore);
+        UnlockSemaphoreInfo(delegate_info->semaphore);
       image=DestroyImageList(image);
       read_info->temporary=MagickTrue;
       (void) SetImageInfo(read_info,0,exception);
@@ -600,10 +546,10 @@ MagickExport Image *ReadImage(const ImageInfo *image_info,
         }
       thread_support=GetMagickThreadSupport(magick_info);
       if ((thread_support & DecoderThreadSupport) == 0)
-        LockSemaphoreInfo(constitute_semaphore);
+        LockSemaphoreInfo(magick_info->semaphore);
       image=(Image *) (GetImageDecoder(magick_info))(read_info,exception);
       if ((thread_support & DecoderThreadSupport) == 0)
-        UnlockSemaphoreInfo(constitute_semaphore);
+        UnlockSemaphoreInfo(magick_info->semaphore);
     }
   if (read_info->temporary != MagickFalse)
     {
@@ -1141,8 +1087,6 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info,
           (void) CloseBlob(image);
         }
     }
-  if (constitute_semaphore == (SemaphoreInfo *) NULL)
-    ActivateSemaphoreInfo(&constitute_semaphore);
   if ((magick_info != (const MagickInfo *) NULL) &&
       (GetImageEncoder(magick_info) != (EncodeImageHandler *) NULL))
     {
@@ -1151,10 +1095,10 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info,
       */
       thread_support=GetMagickThreadSupport(magick_info);
       if ((thread_support & EncoderThreadSupport) == 0)
-        LockSemaphoreInfo(constitute_semaphore);
+        LockSemaphoreInfo(magick_info->semaphore);
       status=GetImageEncoder(magick_info)(write_info,image,exception);
       if ((thread_support & EncoderThreadSupport) == 0)
-        UnlockSemaphoreInfo(constitute_semaphore);
+        UnlockSemaphoreInfo(magick_info->semaphore);
     }
   else
     {
@@ -1166,11 +1110,11 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info,
           */
           *write_info->filename='\0';
           if (GetDelegateThreadSupport(delegate_info) == MagickFalse)
-            LockSemaphoreInfo(constitute_semaphore);
+            LockSemaphoreInfo(delegate_info->semaphore);
           status=InvokeDelegate(write_info,image,(char *) NULL,
             write_info->magick,exception);
           if (GetDelegateThreadSupport(delegate_info) == MagickFalse)
-            UnlockSemaphoreInfo(constitute_semaphore);
+            UnlockSemaphoreInfo(delegate_info->semaphore);
           (void) CopyMagickString(image->filename,filename,MaxTextExtent);
         }
       else
@@ -1220,10 +1164,10 @@ MagickExport MagickBooleanType WriteImage(const ImageInfo *image_info,
               */
               thread_support=GetMagickThreadSupport(magick_info);
               if ((thread_support & EncoderThreadSupport) == 0)
-                LockSemaphoreInfo(constitute_semaphore);
+                LockSemaphoreInfo(magick_info->semaphore);
               status=GetImageEncoder(magick_info)(write_info,image,exception);
               if ((thread_support & EncoderThreadSupport) == 0)
-                UnlockSemaphoreInfo(constitute_semaphore);
+                UnlockSemaphoreInfo(magick_info->semaphore);
             }
         }
     }
index 7d390f028403d36d5524a57a2adbefb1044bb7bf..7544bd93d681ea8ebec0af4926a89a9b35e6570d 100644 (file)
@@ -170,9 +170,6 @@ static MagickBooleanType
 static LinkedListInfo *AcquireDelegateCache(const char *filename,
   ExceptionInfo *exception)
 {
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
-  return(LoadDelegateCache(DelegateMap,"built-in",0,exception));
-#else
   const StringInfo
     *option;
 
@@ -189,18 +186,18 @@ static LinkedListInfo *AcquireDelegateCache(const char *filename,
   status=MagickTrue;
   options=GetConfigureOptions(filename,exception);
   option=(const StringInfo *) GetNextValueInLinkedList(options);
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
   while (option != (const StringInfo *) NULL)
   {
     status&=LoadDelegateCache((const char *) GetStringInfoDatum(option),
       GetStringInfoPath(option),0,exception);
     option=(const StringInfo *) GetNextValueInLinkedList(options);
   }
+#endif
   options=DestroyConfigureOptions(options);
-  if ((delegate_cache == (LinkedListInfo *) NULL) ||
-      (IfMagickTrue(IsLinkedListEmpty(delegate_cache))))
+  if (IfMagickTrue(IsLinkedListEmpty(delegate_cache)))
     status&=LoadDelegateCache(DelegateMap,"built-in",0,exception);
   return(delegate_cache);
-#endif
 }
 \f
 /*
@@ -260,6 +257,8 @@ static void *DestroyDelegate(void *delegate_info)
     p->encode=DestroyString(p->encode);
   if (p->commands != (char *) NULL)
     p->commands=DestroyString(p->commands);
+  if (p->semaphore != (SemaphoreInfo *) NULL)
+    p->semaphore=RelinquishSemaphoreInfo(&p->semaphore);
   p=(DelegateInfo *) RelinquishMagickMemory(p);
   return((void *) NULL);
 }
@@ -1494,6 +1493,8 @@ static MagickBooleanType LoadDelegateCache(const char *xml,const char *filename,
         if (LocaleCompare((char *) keyword,"thread-support") == 0)
           {
             delegate_info->thread_support=IsStringTrue(token);
+            if (delegate_info->thread_support != MagickFalse)
+              delegate_info->semaphore=AcquireSemaphoreInfo();
             break;
           }
         break;
index 44b23453603867cf23a89460c31b22def6b18f51..41b5c16986900402caff156dcb4c373622d66876 100644 (file)
@@ -22,6 +22,9 @@
 extern "C" {
 #endif
 
+#include <stdarg.h>
+#include "MagickCore/semaphore.h"
+
 typedef struct _DelegateInfo
 {
   char
@@ -37,6 +40,9 @@ typedef struct _DelegateInfo
     thread_support,
     spawn,
     stealth;
+
+  SemaphoreInfo
+    *semaphore;
                                                                                 
   size_t
     signature;
index 33312702d83ab4ac90d5e4c3bea9a6676ba862e6..3c2a247acfd91a6d93125428325f5768e9e6b2a0 100644 (file)
@@ -188,9 +188,6 @@ static void *DestroyLocaleNode(void *locale_info)
 static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
   const char *locale,ExceptionInfo *exception)
 {
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
-  return(LoadLocaleCache(LocaleMap,"built-in",locale,0,exception));
-#else
   const StringInfo
     *option;
 
@@ -210,15 +207,17 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
   status=MagickTrue;
   options=GetLocaleOptions(filename,exception);
   option=(const StringInfo *) GetNextValueInLinkedList(options);
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
   while (option != (const StringInfo *) NULL)
   {
     status&=LoadLocaleCache((const char *) GetStringInfoDatum(option),
       GetStringInfoPath(option),locale,0,exception);
     option=(const StringInfo *) GetNextValueInLinkedList(options);
   }
+#endif
   options=DestroyLocaleOptions(options);
-  if ((locale_cache == (SplayTreeInfo *) NULL) ||
-      (GetNumberOfNodesInSplayTree(locale_cache) == 0))
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
+  if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
     {
       options=GetLocaleOptions("english.xml",exception);
       option=(const StringInfo *) GetNextValueInLinkedList(options);
@@ -230,11 +229,10 @@ static SplayTreeInfo *AcquireLocaleSplayTree(const char *filename,
       }
       options=DestroyLocaleOptions(options);
     }
-  if ((locale_cache == (SplayTreeInfo *) NULL) ||
-      (GetNumberOfNodesInSplayTree(locale_cache) == 0))
+#endif
+  if (GetNumberOfNodesInSplayTree(locale_cache) == 0)
     status&=LoadLocaleCache(LocaleMap,"built-in",locale,0,exception);
   return(locale_cache);
-#endif
 }
 \f
 #if defined(MAGICKCORE_HAVE_STRTOD_L)
index fa823f1ef1f19148fd505215ac5e2f63e93037ba..d06d9daaa4b218c970ad0d307af1e1f4293bbfd6 100644 (file)
@@ -831,6 +831,8 @@ static void *DestroyMagickNode(void *magick_info)
     p->description=DestroyString(p->description);
   if (p->name != (char *) NULL)
     p->name=DestroyString(p->name);
+  if (p->semaphore != (SemaphoreInfo *) NULL)
+    p->semaphore=RelinquishSemaphoreInfo(&p->semaphore);
   return(RelinquishMagickMemory(p));
 }
 
@@ -1334,7 +1336,6 @@ MagickExport void MagickCoreGenesis(const char *path,
   (void) ColorComponentGenesis();
   (void) TypeComponentGenesis();
   (void) MimeComponentGenesis();
-  (void) ConstituteComponentGenesis();
   (void) AnnotateComponentGenesis();
 #if defined(MAGICKCORE_X11_DELEGATE)
   (void) XComponentGenesis();
@@ -1374,7 +1375,6 @@ MagickExport void MagickCoreTerminus(void)
   XComponentTerminus();
 #endif
   AnnotateComponentTerminus();
-  ConstituteComponentTerminus();
   MimeComponentTerminus();
   TypeComponentTerminus();
   ColorComponentTerminus();
index 747ecdd8a41818aa5072ea0fce15988875704d46..d897347101ef2a573bc9da4888defa3cb898d316 100644 (file)
@@ -22,6 +22,9 @@
 extern "C" {
 #endif
 
+#include <stdarg.h>
+#include "MagickCore/semaphore.h"
+
 typedef enum
 {
   UndefinedFormatType,
@@ -86,6 +89,9 @@ typedef struct _MagickInfo
   MagickBooleanType
     stealth;
 
+  SemaphoreInfo
+    *semaphore;
+
   size_t
     signature;
 } MagickInfo;
index 18db3b1ed9afe7864ef19050d9be4fc1394baa9d..de88d2c21cabadfc7ed4162a071edad003f87a6f 100644 (file)
@@ -30,7 +30,6 @@ extern MagickExport double
   **RelinquishMagickMatrix(double **,const size_t);
 
 extern MagickExport MagickBooleanType
-  GaussJordanElimination(double **,double **,const size_t,const size_t),
   GetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,void *),
   NullMatrix(MatrixInfo *),
   SetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,const void *);
@@ -43,10 +42,6 @@ MagickExport size_t
   GetMatrixColumns(const MatrixInfo *),
   GetMatrixRows(const MatrixInfo *);
 
-extern MagickExport void
-  LeastSquaresAddTerms(double **,double **,const double *,const double *,
-    const size_t,const size_t);
-
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif
index 7ed1e0f1cd495075c8a4e542758b6b18ad0f7f7f..15037c0edd3fcf4b78e3f48fe6ccacbc34673652 100644 (file)
@@ -338,14 +338,15 @@ MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
 %
 %  The format of the RelinquishSemaphoreInfo method is:
 %
-%      void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
+%      SemaphoreInfo *RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
 %
 %  A description of each parameter follows:
 %
 %    o semaphore_info: Specifies a pointer to an SemaphoreInfo structure.
 %
 */
-MagickExport void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
+MagickExport SemaphoreInfo *RelinquishSemaphoreInfo(
+  SemaphoreInfo **semaphore_info)
 {
   assert(semaphore_info != (SemaphoreInfo **) NULL);
   assert((*semaphore_info) != (SemaphoreInfo *) NULL);
@@ -373,6 +374,7 @@ MagickExport void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
   (*semaphore_info)->signature=(~MagickSignature);
   *semaphore_info=(SemaphoreInfo *) RelinquishSemaphoreMemory(*semaphore_info);
   UnlockMagickMutex();
+  return((SemaphoreInfo *) NULL);
 }
 \f
 /*
index dcb047f04784033a5575c6a11e0535b121e677cf..a2964b618340ffcb75f1ac3982c123249936409f 100644 (file)
@@ -26,12 +26,12 @@ typedef struct SemaphoreInfo
   SemaphoreInfo;
 
 extern MagickExport SemaphoreInfo
-  *AcquireSemaphoreInfo(void);
+  *AcquireSemaphoreInfo(void),
+  *RelinquishSemaphoreInfo(SemaphoreInfo **);
 
 extern MagickExport void
   ActivateSemaphoreInfo(SemaphoreInfo **),
   LockSemaphoreInfo(SemaphoreInfo *),
-  RelinquishSemaphoreInfo(SemaphoreInfo **),
   UnlockSemaphoreInfo(SemaphoreInfo *);
 
 #if defined(__cplusplus) || defined(c_plusplus)
index def5b3791746f5b14dc619e39261da527fd2b48e..b51c3670db10843531e38e0ee171b2fa26cbe28e 100644 (file)
@@ -184,9 +184,6 @@ static void *DestroyTypeNode(void *type_info)
 static SplayTreeInfo *AcquireTypeCache(const char *filename,
   ExceptionInfo *exception)
 {
-#if defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
-  return(LoadTypeCache(TypeMap,"built-in",0,exception));
-#else
   char
     *font_path,
     path[MaxTextExtent];
@@ -211,6 +208,7 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
   *path='\0';
   options=GetConfigureOptions(filename,exception);
   option=(const StringInfo *) GetNextValueInLinkedList(options);
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
   while (option != (const StringInfo *) NULL)
   {
     (void) CopyMagickString(path,GetStringInfoPath(option),MaxTextExtent);
@@ -218,8 +216,10 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
       GetStringInfoPath(option),0,exception);
     option=(const StringInfo *) GetNextValueInLinkedList(options);
   }
+#endif
   options=DestroyConfigureOptions(options);
   font_path=GetEnvironmentValue("MAGICK_FONT_PATH");
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
   if (font_path != (char *) NULL)
     {
       char
@@ -238,11 +238,10 @@ static SplayTreeInfo *AcquireTypeCache(const char *filename,
         }
       font_path=DestroyString(font_path);
     }
-  if ((type_cache == (SplayTreeInfo *) NULL) ||
-      (GetNumberOfNodesInSplayTree(type_cache) == 0))
+#endif
+  if (GetNumberOfNodesInSplayTree(type_cache) == 0)
     status&=LoadTypeCache(TypeMap,"built-in",0,exception);
   return(type_cache);
-#endif
 }
 \f
 /*
index 4c6737c5b936479286cad9b1f587c719aa617ec3..4fbdf60b3a653ebebf655232218f6e00b3647ed2 100644 (file)
@@ -63,6 +63,7 @@
 #include "MagickCore/profile.h"
 #include "MagickCore/property.h"
 #include "MagickCore/quantum-private.h"
+#include "MagickCore/semaphore.h"
 #include "MagickCore/static.h"
 #include "MagickCore/statistic.h"
 #include "MagickCore/string_.h"
@@ -535,6 +536,7 @@ ModuleExport size_t RegisterJP2Image(void)
   entry->adjoin=MagickFalse;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJP2Image;
   entry->encoder=(EncodeImageHandler *) WriteJP2Image;
@@ -550,6 +552,7 @@ ModuleExport size_t RegisterJP2Image(void)
   entry->adjoin=MagickFalse;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJP2Image;
   entry->encoder=(EncodeImageHandler *) WriteJP2Image;
@@ -565,6 +568,7 @@ ModuleExport size_t RegisterJP2Image(void)
   entry->adjoin=MagickFalse;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJP2Image;
   entry->encoder=(EncodeImageHandler *) WriteJP2Image;
@@ -580,6 +584,7 @@ ModuleExport size_t RegisterJP2Image(void)
   entry->adjoin=MagickFalse;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJP2Image;
   entry->encoder=(EncodeImageHandler *) WriteJP2Image;
@@ -595,6 +600,7 @@ ModuleExport size_t RegisterJP2Image(void)
   entry->adjoin=MagickFalse;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJP2Image;
   entry->encoder=(EncodeImageHandler *) WriteJP2Image;
index e4adf212dc5d9d2e19c0c68e70edbdb51252070d..4387d6e419c0d49c56561d83a9c901570c3fad70 100644 (file)
@@ -75,6 +75,7 @@
 #include "MagickCore/property.h"
 #include "MagickCore/quantum-private.h"
 #include "MagickCore/resource_.h"
+#include "MagickCore/semaphore.h"
 #include "MagickCore/splay-tree.h"
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
@@ -1505,6 +1506,7 @@ ModuleExport size_t RegisterJPEGImage(void)
 #endif
   entry=SetMagickInfo("JPEG");
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_JPEG_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJPEGImage;
   entry->encoder=(EncodeImageHandler *) WriteJPEGImage;
@@ -1519,6 +1521,7 @@ ModuleExport size_t RegisterJPEGImage(void)
   (void) RegisterMagickInfo(entry);
   entry=SetMagickInfo("JPG");
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_JPEG_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJPEGImage;
   entry->encoder=(EncodeImageHandler *) WriteJPEGImage;
@@ -1532,6 +1535,7 @@ ModuleExport size_t RegisterJPEGImage(void)
   (void) RegisterMagickInfo(entry);
   entry=SetMagickInfo("PJPEG");
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
 #if defined(MAGICKCORE_JPEG_DELEGATE)
   entry->decoder=(DecodeImageHandler *) ReadJPEGImage;
   entry->encoder=(EncodeImageHandler *) WriteJPEGImage;
index d2e4f563c873ccb7917f9066bd42e9143069d9b1..4270ea07c9a8a69f6117529ba7d88940448f5af3 100644 (file)
@@ -1983,6 +1983,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   entry->format_type=ImplicitFormatType;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
   entry->description=ConstantString("Raw CCITT Group4");
   entry->mime_type=ConstantString("image/tiff");
   entry->module=ConstantString("TIFF");
@@ -1995,6 +1996,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   entry->endian_support=MagickTrue;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
   entry->description=ConstantString("Pyramid encoded TIFF");
   entry->mime_type=ConstantString("image/tiff");
   entry->module=ConstantString("TIFF");
@@ -2008,6 +2010,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   entry->seekable_stream=MagickTrue;
   entry->stealth=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
   entry->description=ConstantString(TIFFDescription);
   if (*version != '\0')
     entry->version=ConstantString(version);
@@ -2023,6 +2026,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   entry->endian_support=MagickTrue;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
   entry->description=ConstantString(TIFFDescription);
   if (*version != '\0')
     entry->version=ConstantString(version);
@@ -2038,6 +2042,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   entry->endian_support=MagickTrue;
   entry->seekable_stream=MagickTrue;
   entry->thread_support=NoThreadSupport;
+  entry->semaphore=AcquireSemaphoreInfo();
   entry->description=ConstantString("Tagged Image File Format (64-bit)");
   if (*version != '\0')
     entry->version=ConstantString(version);