diff options
Diffstat (limited to 'lib/librthread/rthread_libc.c')
-rw-r--r-- | lib/librthread/rthread_libc.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/librthread/rthread_libc.c b/lib/librthread/rthread_libc.c index bf3c057d874..da0d92f8da5 100644 --- a/lib/librthread/rthread_libc.c +++ b/lib/librthread/rthread_libc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_libc.c,v 1.4 2007/06/05 18:11:49 kurt Exp $ */ +/* $OpenBSD: rthread_libc.c,v 1.5 2008/01/01 00:43:39 kurt Exp $ */ /* $snafu: libc_tag.c,v 1.4 2004/11/30 07:00:06 marc Exp $ */ /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ @@ -175,6 +175,23 @@ _thread_malloc_init(void) { } +/* + * arc4random lock + */ +static _spinlock_lock_t arc4_lock = _SPINLOCK_UNLOCKED; + +void +_thread_arc4_lock(void) +{ + _spinlock(&arc4_lock); +} + +void +_thread_arc4_unlock(void) +{ + _spinunlock(&arc4_lock); +} + #if 0 /* * miscellaneous libc exported symbols we want to override |