From 7ff8e670fdcebc6357ff73a15e02d91577802ab6 Mon Sep 17 00:00:00 2001 From: tedu Date: Sat, 1 Jun 2013 20:47:40 +0000 Subject: 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) --- lib/librthread/rthread_libc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/librthread/rthread_libc.c') 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 */ @@ -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) -- cgit v1.2.3-59-g8ed1b