summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2007-11-19 03:16:16 +0000
committerjb <jb@FreeBSD.org>2007-11-19 03:16:16 +0000
commitc0f07cdcc9777db440442b06ebfb089904baad52 (patch)
tree29890779666124af6a222f0eaf3bafc3192e0f19 /sys/powerpc
parent4b62b76062a80ed020e5876c719f318637b318e7 (diff)
downloadFreeBSD-src-c0f07cdcc9777db440442b06ebfb089904baad52.zip
FreeBSD-src-c0f07cdcc9777db440442b06ebfb089904baad52.tar.gz
Define atomic_cmpset_acq_long and atomic_cmpset_rel_long so that
they use casts rather than just assuming that the compiler will DTRT without complaining.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/include/atomic.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h
index 9bbf3bf..976eee5 100644
--- a/sys/powerpc/include/atomic.h
+++ b/sys/powerpc/include/atomic.h
@@ -441,8 +441,10 @@ atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval)
#define atomic_cmpset_acq_int atomic_cmpset_acq_32
#define atomic_cmpset_rel_int atomic_cmpset_rel_32
-#define atomic_cmpset_acq_long atomic_cmpset_acq_32
-#define atomic_cmpset_rel_long atomic_cmpset_rel_32
+#define atomic_cmpset_acq_long(dst, old, new) \
+ atomic_cmpset_acq_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new))
+#define atomic_cmpset_rel_long(dst, old, new) \
+ atomic_cmpset_rel_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new))
#define atomic_cmpset_acq_ptr(dst, old, new) \
atomic_cmpset_acq_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new))
OpenPOWER on IntegriCloud