uatomic.h   uatomic.h 
skipping to change at line 42 skipping to change at line 42
/* /*
* Derived from AO_compare_and_swap() and AO_test_and_set_full(). * Derived from AO_compare_and_swap() and AO_test_and_set_full().
*/ */
struct __uatomic_dummy { struct __uatomic_dummy {
unsigned long v[10]; unsigned long v[10];
}; };
#define __hp(x) ((struct __uatomic_dummy *)(x)) #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 */ /* cmpxchg */
static inline __attribute__((always_inline)) static inline __attribute__((always_inline))
unsigned long __uatomic_cmpxchg(void *addr, unsigned long old, unsigned long __uatomic_cmpxchg(void *addr, unsigned long old,
unsigned long _new, int len) unsigned long _new, int len)
{ {
switch (len) { switch (len) {
case 1: case 1:
{ {
skipping to change at line 531 skipping to change at line 531
#define UATOMIC_COMPAT(insn) \ #define UATOMIC_COMPAT(insn) \
((caa_likely(__rcu_cas_avail > 0)) \ ((caa_likely(__rcu_cas_avail > 0)) \
? (_uatomic_##insn) \ ? (_uatomic_##insn) \
: ((caa_unlikely(__rcu_cas_avail < 0) \ : ((caa_unlikely(__rcu_cas_avail < 0) \
? ((__rcu_cas_init() > 0) \ ? ((__rcu_cas_init() > 0) \
? (_uatomic_##insn) \ ? (_uatomic_##insn) \
: (compat_uatomic_##insn)) \ : (compat_uatomic_##insn)) \
: (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, extern unsigned long _compat_uatomic_set(void *addr,
unsigned long _new, int len); unsigned long _new, int len);
#define compat_uatomic_set(addr, _new) \ #define compat_uatomic_set(addr, _new) \
((__typeof__(*(addr))) _compat_uatomic_set((addr), ((void) _compat_uatomic_set((addr),
\ \
caa_cast_long_keep_sign(_new caa_cast_long_keep_sign(_new),
), \ \
sizeof(*(addr)))) sizeof(*(addr))))
extern unsigned long _compat_uatomic_xchg(void *addr, extern unsigned long _compat_uatomic_xchg(void *addr,
unsigned long _new, int len); unsigned long _new, int len);
#define compat_uatomic_xchg(addr, _new) \ #define compat_uatomic_xchg(addr, _new) \
((__typeof__(*(addr))) _compat_uatomic_xchg((addr), \ ((__typeof__(*(addr))) _compat_uatomic_xchg((addr), \
caa_cast_long_keep_sign(_new ), \ caa_cast_long_keep_sign(_new ), \
sizeof(*(addr)))) sizeof(*(addr))))
extern unsigned long _compat_uatomic_cmpxchg(void *addr, unsigned long old, extern unsigned long _compat_uatomic_cmpxchg(void *addr, unsigned long old,
unsigned long _new, int len); unsigned long _new, int len);
 End of changes. 3 change blocks. 
6 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/