diff options
author | cognet <cognet@FreeBSD.org> | 2005-12-09 22:58:07 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-12-09 22:58:07 +0000 |
commit | 29be5fb867706a87e60198e9b048335309b7edae (patch) | |
tree | 31e012dc62919d5b4687259f395a1eb12adc0911 /sys/arm | |
parent | f9d54471f0f860bd401b1f02a7a47334c1946a8d (diff) | |
download | FreeBSD-src-29be5fb867706a87e60198e9b048335309b7edae.zip FreeBSD-src-29be5fb867706a87e60198e9b048335309b7edae.tar.gz |
A #define is not enough, we need to cast from u_long * to uint32_t *.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/include/atomic.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 42713a6..aae130a 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -310,6 +310,13 @@ atomic_readandclear_32(volatile u_int32_t *p) #endif /* _LOCORE */ +static __inline int +atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src) +{ + return (atomic_cmpset_32((volatile u_int *)dst, (u_int)exp, + (u_int)src)); +} + #define atomic_set_rel_int atomic_set_32 #define atomic_set_acq_long atomic_set_32 #define atomic_set_int atomic_set_32 @@ -328,7 +335,7 @@ atomic_readandclear_32(volatile u_int32_t *p) #define atomic_cmpset_rel_ptr atomic_cmpset_ptr #define atomic_cmpset_acq_int atomic_cmpset_32 #define atomic_cmpset_acq_ptr atomic_cmpset_ptr -#define atomic_cmpset_acq_long atomic_cmpset_ptr +#define atomic_cmpset_acq_long atomic_cmpset_long #define atomic_store_rel_ptr atomic_store_ptr #define atomic_store_rel_int atomic_store_32 #define atomic_cmpset_rel_32 atomic_cmpset_32 |