summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-01-02 06:01:47 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-01-02 06:01:47 +0000
commit07ce80a7858773adbb3dedbdd36e6f085b77eb3b (patch)
treef6a3413b4128d8915ff4120cbb0c4c9a67b4d4a9 /sys/arch/amd64/include
parentc2794d3889ffc4603a4eee8827af0baf1ff82d1e (diff)
Give LOCKDEBUG kernels a chance to compile; ok kettenis@
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/lock.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/amd64/include/lock.h b/sys/arch/amd64/include/lock.h
index 57674ae58f7..fe52797349c 100644
--- a/sys/arch/amd64/include/lock.h
+++ b/sys/arch/amd64/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.2 2007/05/25 20:48:33 art Exp $ */
+/* $OpenBSD: lock.h,v 1.3 2008/01/02 06:01:46 miod Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -59,6 +59,8 @@ typedef __volatile int __cpu_simple_lock_t;
#define __lockbarrier() __asm __volatile("": : :"memory")
+#include <machine/atomic.h>
+
#ifdef LOCKDEBUG
extern void __cpu_simple_lock_init(__cpu_simple_lock_t *);
@@ -68,8 +70,6 @@ extern void __cpu_simple_unlock(__cpu_simple_lock_t *);
#else
-#include <machine/atomic.h>
-
static __inline void __cpu_simple_lock_init(__cpu_simple_lock_t *)
__attribute__((__unused__));
static __inline void __cpu_simple_lock(__cpu_simple_lock_t *)
@@ -114,8 +114,8 @@ __cpu_simple_unlock(__cpu_simple_lock_t *lockp)
*lockp = __SIMPLELOCK_UNLOCKED;
}
-#define rw_cas(p, o, n) (x86_atomic_cas_ul(p, o, n) != o)
-
#endif /* !LOCKDEBUG */
+#define rw_cas(p, o, n) (x86_atomic_cas_ul(p, o, n) != o)
+
#endif /* _AMD64_LOCK_H_ */