diff --git a/sys/ia64/include/atomic.h b/sys/ia64/include/atomic.h index f6601808a9c5..3ff05214cfcc 100644 --- a/sys/ia64/include/atomic.h +++ b/sys/ia64/include/atomic.h @@ -138,8 +138,11 @@ ATOMIC_STORE_LOAD(long, 64, "8") #undef ATOMIC_STORE_LOAD -#define atomic_load_acq_ptr atomic_load_acq_64 -#define atomic_store_rel_ptr atomic_store_rel_64 +#define atomic_load_acq_ptr(p) \ + ((void *)atomic_load_acq_64((volatile uint64_t *)p)) + +#define atomic_store_rel_ptr(p, v) \ + atomic_store_rel_64((volatile uint64_t *)p, (uint64_t)v) #define IA64_ATOMIC(sz, type, name, width, op) \ static __inline type \ @@ -258,6 +261,7 @@ IA64_ATOMIC(8, uint64_t, subtract, 64, -) #define atomic_add_rel_long atomic_add_rel_64 #define atomic_subtract_rel_long atomic_subtract_rel_64 +/* XXX Needs casting. */ #define atomic_set_ptr atomic_set_64 #define atomic_clear_ptr atomic_clear_64 #define atomic_add_ptr atomic_add_64 @@ -311,13 +315,18 @@ atomic_cmpset_rel_64(volatile uint64_t* p, uint64_t cmpval, uint64_t newval) #define atomic_cmpset_64 atomic_cmpset_acq_64 #define atomic_cmpset_int atomic_cmpset_32 #define atomic_cmpset_long atomic_cmpset_64 -#define atomic_cmpset_ptr atomic_cmpset_64 #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_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 -#define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 + +#define atomic_cmpset_acq_ptr(p, o, n) \ + (atomic_cmpset_acq_64((volatile uint64_t *)p, (uint64_t)o, (uint64_t)n)) + +#define atomic_cmpset_ptr atomic_cmpset_acq_ptr + +#define atomic_cmpset_rel_ptr(p, o, n) \ + (atomic_cmpset_rel_64((volatile uint64_t *)p, (uint64_t)o, (uint64_t)n)) static __inline uint32_t atomic_readandclear_32(volatile uint32_t* p)