diff options
author | 2013-06-01 20:47:40 +0000 | |
---|---|---|
committer | 2013-06-01 20:47:40 +0000 | |
commit | 7ff8e670fdcebc6357ff73a15e02d91577802ab6 (patch) | |
tree | ed53d42fedbc32a6eba99a84f0405645632bc508 /lib/librthread/rthread_libc.c | |
parent | Filter out route messages we don't need and log kernel messages in (diff) | |
download | wireguard-openbsd-7ff8e670fdcebc6357ff73a15e02d91577802ab6.tar.xz wireguard-openbsd-7ff8e670fdcebc6357ff73a15e02d91577802ab6.zip |
cleanup and consolidate the spinlock_lock (what a name!) code.
it's now atomic_lock to better reflect its usage, and librthread now
features a new spinlock that's really a ticket lock.
thrlseep can handle both types of lock via a flag in the clock arg.
(temp back compat hack)
remove some old stuff that's accumulated along the way and no longer used.
some feedback from dlg, who is concerned with all things ticket lock.
(you need to boot a new kernel before installing librthread)
Diffstat (limited to 'lib/librthread/rthread_libc.c')
-rw-r--r-- | lib/librthread/rthread_libc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/librthread/rthread_libc.c b/lib/librthread/rthread_libc.c index fad70524c75..13df27c498e 100644 --- a/lib/librthread/rthread_libc.c +++ b/lib/librthread/rthread_libc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_libc.c,v 1.10 2012/04/17 15:10:11 miod Exp $ */ +/* $OpenBSD: rthread_libc.c,v 1.11 2013/06/01 20:47:40 tedu 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> */ @@ -152,7 +152,7 @@ _thread_mutex_destroy(void **mutex) /* * the malloc lock */ -static _spinlock_lock_t malloc_lock = _SPINLOCK_UNLOCKED; +static struct _spinlock malloc_lock = _SPINLOCK_UNLOCKED; void _thread_malloc_lock(void) @@ -169,7 +169,7 @@ _thread_malloc_unlock(void) /* * atexit lock */ -static _spinlock_lock_t atexit_lock = _SPINLOCK_UNLOCKED; +static struct _spinlock atexit_lock = _SPINLOCK_UNLOCKED; void _thread_atexit_lock(void) @@ -186,7 +186,7 @@ _thread_atexit_unlock(void) /* * arc4random lock */ -static _spinlock_lock_t arc4_lock = _SPINLOCK_UNLOCKED; +static struct _spinlock arc4_lock = _SPINLOCK_UNLOCKED; void _thread_arc4_lock(void) |