18#ifndef MAGICKCORE_RANDOM_PRIVATE_H
19#define MAGICKCORE_RANDOM_PRIVATE_H
21#include "MagickCore/thread-private.h"
23#if defined(__cplusplus) || defined(c_plusplus)
27extern MagickPrivate
double
30extern MagickPrivate MagickBooleanType
31 RandomComponentGenesis(
void);
33extern MagickPrivate
unsigned long
36extern MagickPrivate
void
37 RandomComponentTerminus(
void);
44 for (i=0; i < (ssize_t) GetMagickResourceLimit(ThreadResource); i++)
46 random_info[i]=DestroyRandomInfo(random_info[i]);
47 return((
RandomInfo **) RelinquishMagickMemory(random_info));
50static inline RandomInfo **AcquireRandomInfoTLS(
void)
61 number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
62 random_info=(
RandomInfo **) AcquireQuantumMemory(number_threads,
63 sizeof(*random_info));
65 ThrowFatalException(ResourceLimitFatalError,
"MemoryAllocationFailed");
66 (void) memset(random_info,0,number_threads*
sizeof(*random_info));
67 for (i=0; i < (ssize_t) number_threads; i++)
68 random_info[i]=AcquireRandomInfo();
72#if defined(__cplusplus) || defined(c_plusplus)