From 2fbfcceb960fb807aa9b99a0597dedde67f9d6f8 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 1 Jun 2013 20:47:41 +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) --- sys/arch/alpha/include/spinlock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sys/arch/alpha/include') diff --git a/sys/arch/alpha/include/spinlock.h b/sys/arch/alpha/include/spinlock.h index 463ac57ddfb..688d5837e12 100644 --- a/sys/arch/alpha/include/spinlock.h +++ b/sys/arch/alpha/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 1999/01/08 08:25:33 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif -- cgit v1.2.3