X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-pointer-static.h;h=093630a084f84ba7c5917a5621ee3fe1de3af258;hp=0a01f1ffc944550d3c66cdf9b8d5a53c2a5c8225;hb=0ecb3fde04135d76545ce55d80abea9aef465b54;hpb=2b5554c9169ea1ef93dffacb7671a00f9e7de511 diff --git a/urcu-pointer-static.h b/urcu-pointer-static.h index 0a01f1f..093630a 100644 --- a/urcu-pointer-static.h +++ b/urcu-pointer-static.h @@ -32,7 +32,11 @@ #include #include #include -#include +#include + +#ifdef __cplusplus +extern "C" { +#endif /** * _rcu_dereference - reads (copy) a RCU-protected pointer to a local variable @@ -103,7 +107,7 @@ if (!__builtin_constant_p(v) || \ ((v) != NULL)) \ wmb(); \ - STORE_SHARED(*(p), _________pv); \ + uatomic_set(p, _________pv); \ }) /** @@ -121,4 +125,8 @@ #define _rcu_assign_pointer(p, v) _rcu_set_pointer(&(p), v) +#ifdef __cplusplus +} +#endif + #endif /* _URCU_POINTER_STATIC_H */