summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thread_malloc_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thread_malloc_lock.c')
-rw-r--r--lib/libpthread/thread/thread_malloc_lock.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thread_malloc_lock.c b/lib/libpthread/thread/thread_malloc_lock.c
index 6e8b96bb656..6deebb53f66 100644
--- a/lib/libpthread/thread/thread_malloc_lock.c
+++ b/lib/libpthread/thread/thread_malloc_lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: thread_malloc_lock.c,v 1.5 2006/02/22 07:16:32 otto Exp $ */
+/* $OpenBSD: thread_malloc_lock.c,v 1.6 2008/01/01 00:43:39 kurt Exp $ */
/* Public Domain <marc@snafu.org> */
#include <pthread.h>
@@ -6,6 +6,7 @@
static spinlock_t malloc_lock = _SPINLOCK_INITIALIZER;
static spinlock_t atexit_lock = _SPINLOCK_INITIALIZER;
+static spinlock_t arc4_lock = _SPINLOCK_INITIALIZER;
void
_thread_malloc_lock()
@@ -35,3 +36,15 @@ _thread_atexit_unlock()
{
_SPINUNLOCK(&atexit_lock);
}
+
+void
+_thread_arc4_lock()
+{
+ _SPINLOCK(&arc4_lock);
+}
+
+void
+_thread_arc4_unlock()
+{
+ _SPINUNLOCK(&arc4_lock);
+}