*/
#define _rcu_dereference(p) ({ \
- typeof(p) _________p1 = CMM_LOAD_SHARED(p); \
+ __typeof__(p) _________p1 = CMM_LOAD_SHARED(p); \
cmm_smp_read_barrier_depends(); \
(_________p1); \
})
#define _rcu_cmpxchg_pointer(p, old, _new) \
({ \
- typeof(*p) _________pold = (old); \
- typeof(*p) _________pnew = (_new); \
+ __typeof__(*p) _________pold = (old); \
+ __typeof__(*p) _________pnew = (_new); \
if (!__builtin_constant_p(_new) || \
((_new) != NULL)) \
cmm_wmb(); \
#define _rcu_xchg_pointer(p, v) \
({ \
- typeof(*p) _________pv = (v); \
+ __typeof__(*p) _________pv = (v); \
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
#define _rcu_set_pointer(p, v) \
- ({ \
- typeof(*p) _________pv = (v); \
+ do { \
+ __typeof__(*p) _________pv = (v); \
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
uatomic_set(p, _________pv); \
- })
+ } while (0)
/**
* _rcu_assign_pointer - assign (publicize) a pointer to a new data structure