X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fstatic%2Furcu-pointer.h;h=906caa009c708c13cc2f9a6b0c1e989416e3aed7;hp=acd7cee1f0677554794f238e945715e1e4bd3b10;hb=3daae22a68a6e74c99d39a8c6b628f5c9121c54a;hpb=c7eaf61c307ee909eb2dcebb956e73776f1a0441 diff --git a/urcu/static/urcu-pointer.h b/urcu/static/urcu-pointer.h index acd7cee..906caa0 100644 --- a/urcu/static/urcu-pointer.h +++ b/urcu/static/urcu-pointer.h @@ -102,13 +102,13 @@ extern "C" { #define _rcu_set_pointer(p, 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