diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-07-18 10:40:15 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-07-18 10:40:15 +0000 |
commit | 04adf5332c666d066f6829c7b47862bb37caa675 (patch) | |
tree | c2d32403115e58858461b54eef4c6c7501771eb3 /sys/arch/sparc64/include | |
parent | f67dc84fb8d096f91bbecf68bfc01eb126a1a8a3 (diff) |
pass atomic_{cas,swap}_uint a volatile void * instead of a volatile
void **. the latter is really hard to cast for, and not what what
solaris does.
ok kettenis@
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r-- | sys/arch/sparc64/include/atomic.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/include/atomic.h b/sys/arch/sparc64/include/atomic.h index 29d05829631..bcf412ee6b3 100644 --- a/sys/arch/sparc64/include/atomic.h +++ b/sys/arch/sparc64/include/atomic.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomic.h,v 1.11 2014/03/29 18:09:30 guenther Exp $ */ +/* $OpenBSD: atomic.h,v 1.12 2014/07/18 10:40:14 dlg Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> * @@ -43,11 +43,11 @@ _atomic_cas_ulong(volatile unsigned long *p, unsigned long e, unsigned long n) #define atomic_cas_ulong(_p, _e, _n) _atomic_cas_ulong((_p), (_e), (_n)) static inline void * -_atomic_cas_ptr(volatile void **p, void *e, void *n) +_atomic_cas_ptr(volatile void *p, void *e, void *n) { __asm volatile("casx [%2], %3, %0" - : "+r" (n), "=m" (*p) - : "r" (p), "r" (e), "m" (*p)); + : "+r" (n), "=m" (*(volatile unsigned long *)p) + : "r" (p), "r" (e), "m" (*(volatile unsigned long *)p)); return (n); } |