diff options
author | marcel <marcel@FreeBSD.org> | 2007-07-10 04:40:00 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2007-07-10 04:40:00 +0000 |
commit | 3a7ad7265154d6aaa7df7ebe1c1e1fae975f1574 (patch) | |
tree | 93a52fe8a3727caeb9ece008d04bdc6738b8a866 | |
parent | 30ae6d0ff13ca17ef354c9c7271ef56963b22647 (diff) | |
download | FreeBSD-src-3a7ad7265154d6aaa7df7ebe1c1e1fae975f1574.zip FreeBSD-src-3a7ad7265154d6aaa7df7ebe1c1e1fae975f1574.tar.gz |
Cast the arguments to atomic_*_ptr() when mapping it to atomic_*_32()
This is a minimal fix.
Approved by: re (kensmith)
-rw-r--r-- | sys/powerpc/include/atomic.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index 9faa5bc..9bbf3bf 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -414,7 +414,9 @@ atomic_cmpset_64(volatile u_int64_t* p, u_int64_t cmpval, u_int64_t newval) #define atomic_cmpset_int atomic_cmpset_32 #define atomic_cmpset_long atomic_cmpset_32 -#define atomic_cmpset_ptr atomic_cmpset_32 + +#define atomic_cmpset_ptr(dst, old, new) \ + atomic_cmpset_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) #if 0 #define atomic_cmpset_long_long atomic_cmpset_64 @@ -441,8 +443,11 @@ atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) #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_ptr atomic_cmpset_acq_32 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_32 + +#define atomic_cmpset_acq_ptr(dst, old, new) \ + atomic_cmpset_acq_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) +#define atomic_cmpset_rel_ptr(dst, old, new) \ + atomic_cmpset_rel_32((volatile u_int *)(dst), (u_int)(old), (u_int)(new)) static __inline uint32_t atomic_fetchadd_32(volatile uint32_t *p, uint32_t v) |