paulmck@xxxxxxxxxx wrote: > +#define rcu_replace(rcu_ptr, ptr, c) \ > +({ \ > + typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \ > + rcu_assign_pointer((rcu_ptr), (ptr)); \ > + __tmp; \ > +}) Does it make sense to actually use xchg() if that's supported by the arch? David