X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fstatic%2Furcu-pointer.h;h=28333c57746e927bfc44e06e0a9fcc2b0e4794e2;hp=a5b3e4b190852811b039c26be66f65c33bef64e6;hb=a59f39055b5ecb77b68cf78b9839aa9e8e4ec332;hpb=edf8de69524464be218d35029919f6fb31ba3d4b diff --git a/urcu/static/urcu-pointer.h b/urcu/static/urcu-pointer.h index a5b3e4b..28333c5 100644 --- a/urcu/static/urcu-pointer.h +++ b/urcu/static/urcu-pointer.h @@ -36,7 +36,7 @@ #ifdef __cplusplus extern "C" { -#endif +#endif /** * _rcu_dereference - reads (copy) a RCU-protected pointer to a local variable @@ -64,7 +64,9 @@ extern "C" { * meets the 10-line criterion in LGPL, allowing this function to be * expanded directly in non-LGPL code. */ -#define _rcu_dereference(p) ({ \ +#define _rcu_dereference(p) \ + __extension__ \ + ({ \ __typeof__(p) _________p1 = CMM_LOAD_SHARED(p); \ cmm_smp_read_barrier_depends(); \ (_________p1); \ @@ -82,6 +84,7 @@ extern "C" { * expanded directly in non-LGPL code. */ #define _rcu_cmpxchg_pointer(p, old, _new) \ + __extension__ \ ({ \ __typeof__(*p) _________pold = (old); \ __typeof__(*p) _________pnew = (_new); \ @@ -101,6 +104,7 @@ extern "C" { * expanded directly in non-LGPL code. */ #define _rcu_xchg_pointer(p, v) \ + __extension__ \ ({ \ __typeof__(*p) _________pv = (v); \ if (!__builtin_constant_p(v) || \ @@ -137,7 +141,7 @@ extern "C" { */ #define _rcu_assign_pointer(p, v) _rcu_set_pointer(&(p), v) -#ifdef __cplusplus +#ifdef __cplusplus } #endif