Update return value of "set" operations
[urcu.git] / urcu / static / urcu-pointer.h
index b6444860f51143dca1bb3d5eb34e4bbd4a6ce1cd..906caa009c708c13cc2f9a6b0c1e989416e3aed7 100644 (file)
@@ -32,7 +32,7 @@
 #include <urcu/compiler.h>
 #include <urcu/arch.h>
 #include <urcu/system.h>
-#include <urcu/uatomic_arch.h>
+#include <urcu/uatomic.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -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
This page took 0.022906 seconds and 4 git commands to generate.