X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fuatomic%2Fx86.h;h=129a2f5670385880870912235a14a63a6d0ea99e;hp=ce1ce5e9b48b75f193d9c80f81977c2005888492;hb=67ecffc0f530a7b5c4dd5111ea7dd3213da8eb91;hpb=d0bbd9c2e8322f036e0a0a70091cae98cad7e390 diff --git a/urcu/uatomic/x86.h b/urcu/uatomic/x86.h index ce1ce5e..129a2f5 100644 --- a/urcu/uatomic/x86.h +++ b/urcu/uatomic/x86.h @@ -1,7 +1,7 @@ #ifndef _URCU_ARCH_UATOMIC_X86_H #define _URCU_ARCH_UATOMIC_X86_H -/* +/* * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. * Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P. @@ -28,7 +28,7 @@ #ifdef __cplusplus extern "C" { -#endif +#endif /* * Derived from AO_compare_and_swap() and AO_test_and_set_full(). @@ -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, @@ -616,7 +620,7 @@ extern unsigned long _compat_uatomic_add_return(void *addr, #define cmm_smp_mb__before_uatomic_dec() cmm_barrier() #define cmm_smp_mb__after_uatomic_dec() cmm_barrier() -#ifdef __cplusplus +#ifdef __cplusplus } #endif