X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-pointer-static.h;fp=urcu-pointer-static.h;h=c0533c9d3281af0f613e7490ce18e67594bf75e4;hp=33bfdeecae3351a4b339481eb253b342434ece76;hb=e156285068a631eaafa643d9e930b31780468d00;hpb=7d413817f09b2d17b1a79ea012590609ffab5eb6 diff --git a/urcu-pointer-static.h b/urcu-pointer-static.h index 33bfdee..c0533c9 100644 --- a/urcu-pointer-static.h +++ b/urcu-pointer-static.h @@ -78,7 +78,10 @@ if (!__builtin_constant_p(_new) || \ ((_new) != NULL)) \ wmb(); \ - uatomic_cmpxchg(p, _________pold, _________pnew); \ + (likely(URCU_CAS_AVAIL()) ? \ + (uatomic_cmpxchg(p, _________pold, _________pnew)) : \ + (compat_uatomic_cmpxchg(p, _________pold, \ + _________pnew))) \ }) /**