summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_stack.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2013-06-01 20:47:40 +0000
committertedu <tedu@openbsd.org>2013-06-01 20:47:40 +0000
commit7ff8e670fdcebc6357ff73a15e02d91577802ab6 (patch)
treeed53d42fedbc32a6eba99a84f0405645632bc508 /lib/librthread/rthread_stack.c
parentFilter out route messages we don't need and log kernel messages in (diff)
downloadwireguard-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_stack.c')
-rw-r--r--lib/librthread/rthread_stack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_stack.c b/lib/librthread/rthread_stack.c
index b194907534a..557a6b4267b 100644
--- a/lib/librthread/rthread_stack.c
+++ b/lib/librthread/rthread_stack.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_stack.c,v 1.9 2013/03/21 21:59:31 deraadt Exp $ */
+/* $OpenBSD: rthread_stack.c,v 1.10 2013/06/01 20:47:40 tedu Exp $ */
/* $snafu: rthread_stack.c,v 1.12 2005/01/11 02:45:28 marc Exp $ */
/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */
@@ -19,7 +19,7 @@
* attributes for possible reuse.
*/
static SLIST_HEAD(, stack) def_stacks = SLIST_HEAD_INITIALIZER(head);
-static _spinlock_lock_t def_stacks_lock = _SPINLOCK_UNLOCKED;
+static struct _spinlock def_stacks_lock = _SPINLOCK_UNLOCKED;
struct stack *
_rthread_alloc_stack(pthread_t thread)