aboutsummaryrefslogtreecommitdiff
path: root/crypto/compat/thread_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/compat/thread_private.h')
-rw-r--r--crypto/compat/thread_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/compat/thread_private.h b/crypto/compat/thread_private.h
new file mode 100644
index 0000000..3286a7c
--- /dev/null
+++ b/crypto/compat/thread_private.h
@@ -0,0 +1,6 @@
1#include <pthread.h>
2
3static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
4
5#define _ARC4_LOCK() pthread_mutex_lock(&arc4random_mtx)
6#define _ARC4_UNLOCK() pthread_mutex_unlock(&arc4random_mtx)