diff options
-rw-r--r-- | sys/arch/sparc64/include/lock.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sparc64/include/lock.h b/sys/arch/sparc64/include/lock.h index c880043998b..7c8d35490a4 100644 --- a/sys/arch/sparc64/include/lock.h +++ b/sys/arch/sparc64/include/lock.h @@ -1,10 +1,11 @@ -/* $OpenBSD: lock.h,v 1.2 2007/11/05 20:19:22 miod Exp $ */ +/* $OpenBSD: lock.h,v 1.3 2008/01/01 23:37:16 miod Exp $ */ /* public domain */ #ifndef _SPARC64_LOCK_H_ #define _SPARC64_LOCK_H_ +#include <machine/atomic.h> #include <machine/ctlreg.h> typedef volatile u_int8_t __cpu_simple_lock_t; @@ -50,4 +51,6 @@ __cpu_simple_unlock(__cpu_simple_lock_t *l) *l = __SIMPLELOCK_UNLOCKED; } +#define rw_cas_sparc64 (sparc64_casx(p, o, n) != o) + #endif /* _SPARC64_LOCK_H_ */ |