]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/random-private.h
(no commit message)
[imagemagick] / MagickCore / random-private.h
index a758de2af74b0b8607eaa67093b9ef3f6f869fcf..7f0c0591c416d34019f53d84d3243f5c42f73076 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2012 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.
 #ifndef _MAGICKCORE_RANDOM_PRIVATE_H
 #define _MAGICKCORE_RANDOM_PRIVATE_H
 
+#include "MagickCore/thread-private.h"
+
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
 
-#include "MagickCore/thread-private.h"
+extern MagickPrivate double
+  GetRandomInfoNormalize(RandomInfo *);
 
 extern MagickPrivate MagickBooleanType
   RandomComponentGenesis(void);
 
+extern MagickPrivate unsigned long
+  *GetRandomInfoSeed(RandomInfo *);
+
 extern MagickPrivate void
   RandomComponentTerminus(void);
 
@@ -37,7 +43,7 @@ static inline RandomInfo **DestroyRandomInfoThreadSet(
     i;
 
   assert(random_info != (RandomInfo **) NULL);
-  for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
+  for (i=0; i < (ssize_t) GetMagickResourceLimit(ThreadResource); i++)
     if (random_info[i] != (RandomInfo *) NULL)
       random_info[i]=DestroyRandomInfo(random_info[i]);
   return((RandomInfo **) RelinquishMagickMemory(random_info));
@@ -54,7 +60,7 @@ static inline RandomInfo **AcquireRandomInfoThreadSet(void)
   size_t
     number_threads;
 
-  number_threads=GetOpenMPMaximumThreads();
+  number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
   random_info=(RandomInfo **) AcquireQuantumMemory(number_threads,
     sizeof(*random_info));
   if (random_info == (RandomInfo **) NULL)