X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu-pointer-static.h;h=c0533c9d3281af0f613e7490ce18e67594bf75e4;hb=c96a37267efd57cddf7a30f472f9e56f2ecddddc;hp=33bfdeecae3351a4b339481eb253b342434ece76;hpb=48d848c7291ec22da6258ac03cd9c1dafec1fdfb;p=urcu.git 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))) \ }) /**