summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/include/lock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/amd64/include/lock.h b/sys/arch/amd64/include/lock.h
index 35b1974f910..57674ae58f7 100644
--- a/sys/arch/amd64/include/lock.h
+++ b/sys/arch/amd64/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.1 2004/06/25 11:03:28 art Exp $ */
+/* $OpenBSD: lock.h,v 1.2 2007/05/25 20:48:33 art Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -114,6 +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 */
#endif /* _AMD64_LOCK_H_ */