From c0f07cdcc9777db440442b06ebfb089904baad52 Mon Sep 17 00:00:00 2001 From: jb Date: Mon, 19 Nov 2007 03:16:16 +0000 Subject: 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. --- sys/powerpc/include/atomic.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/powerpc') 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)) -- cgit v1.1