diff options
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/shlib_version | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thread_malloc_lock.c | 15 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_init.c | 4 |
3 files changed, 18 insertions, 3 deletions
diff --git a/lib/libpthread/shlib_version b/lib/libpthread/shlib_version index d0f0988b418..00604e64e7d 100644 --- a/lib/libpthread/shlib_version +++ b/lib/libpthread/shlib_version @@ -1,2 +1,2 @@ major=8 -minor=0 +minor=1 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); +} diff --git a/lib/libpthread/uthread/uthread_init.c b/lib/libpthread/uthread/uthread_init.c index d48e1173566..36559a5ae34 100644 --- a/lib/libpthread/uthread/uthread_init.c +++ b/lib/libpthread/uthread/uthread_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_init.c,v 1.40 2007/07/20 22:34:40 kettenis Exp $ */ +/* $OpenBSD: uthread_init.c,v 1.41 2008/01/01 00:43:39 kurt Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -135,6 +135,8 @@ static void *references[] = { &_thread_malloc_unlock, &_thread_atexit_lock, &_thread_atexit_unlock, + &_thread_arc4_lock, + &_thread_arc4_unlock, &_thread_tag_lock, &_thread_tag_unlock, &_thread_tag_storage, |