X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fuatomic%2Fx86.h;fp=urcu%2Fuatomic%2Fx86.h;h=a139228346cb64b5eed2425f0d71f8f78f58e9dc;hp=ce1ce5e9b48b75f193d9c80f81977c2005888492;hb=424d4ed5e7b0ca5e05c3078f15abf473c6879521;hpb=edf0b358d645c135f903a2331324b900e79f65ae diff --git a/urcu/uatomic/x86.h b/urcu/uatomic/x86.h index ce1ce5e..a139228 100644 --- a/urcu/uatomic/x86.h +++ b/urcu/uatomic/x86.h @@ -39,7 +39,7 @@ struct __uatomic_dummy { }; #define __hp(x) ((struct __uatomic_dummy *)(x)) -#define _uatomic_set(addr, v) CMM_STORE_SHARED(*(addr), (v)) +#define _uatomic_set(addr, v) ((void) CMM_STORE_SHARED(*(addr), (v))) /* cmpxchg */ @@ -529,12 +529,16 @@ extern int __rcu_cas_init(void); : (compat_uatomic_##insn)) \ : (compat_uatomic_##insn)))) +/* + * We leave the return value so we don't break the ABI, but remove the + * return value from the API. + */ extern unsigned long _compat_uatomic_set(void *addr, unsigned long _new, int len); #define compat_uatomic_set(addr, _new) \ - ((__typeof__(*(addr))) _compat_uatomic_set((addr), \ - caa_cast_long_keep_sign(_new), \ - sizeof(*(addr)))) + ((void) _compat_uatomic_set((addr), \ + caa_cast_long_keep_sign(_new), \ + sizeof(*(addr)))) extern unsigned long _compat_uatomic_xchg(void *addr,