summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2013-06-01 20:47:41 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2013-06-01 20:47:41 +0000
commit2fbfcceb960fb807aa9b99a0597dedde67f9d6f8 (patch)
tree8898346871e5f91b8f2a10e9d30e44dbbf668349 /sys/arch/m88k/include
parent751ab61a6dd86c9f4339695dcb646ee54892c289 (diff)
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 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/spinlock.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/m88k/include/spinlock.h b/sys/arch/m88k/include/spinlock.h
index cce8d02ec4c..c4dfcedb5ba 100644
--- a/sys/arch/m88k/include/spinlock.h
+++ b/sys/arch/m88k/include/spinlock.h
@@ -1,10 +1,14 @@
-/* $OpenBSD: spinlock.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */
#ifndef _M88K_SPINLOCK_H_
#define _M88K_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