X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Furcu-pointer.h;h=06371e3dd1c066387db5316087346ccf9bbdf80b;hb=20da51e457e3e6a70141ccb40c911d44815f7f63;hp=4361156b925f515bd6cfe231861f8b228284745d;hpb=a5a9f428a238e790d6c97299bc214b5cca815cd7;p=userspace-rcu.git diff --git a/urcu/static/urcu-pointer.h b/urcu/static/urcu-pointer.h index 4361156..06371e3 100644 --- a/urcu/static/urcu-pointer.h +++ b/urcu/static/urcu-pointer.h @@ -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) || \ @@ -129,7 +133,7 @@ extern "C" { * them. It also makes sure the compiler does not reorder code initializing the * data structure before its publication. * - * Should match rcu_dereference_pointer(). + * Should match rcu_dereference(). * * This macro is less than 10 lines long. The intent is that this macro * meets the 10-line criterion in LGPL, allowing this function to be