Compat futex
[urcu.git] / urcu-pointer.c
index da8b1ea7e76d0c702af5adb37f32361597525022..83f0ffdacb388cdc87016a9a10408fe7b712e62d 100644 (file)
@@ -24,6 +24,8 @@
  * IBM's contributions to this file may be relicensed under LGPLv2 or later.
  */
 
+#include <urcu/uatomic_arch.h>
+
 #include "urcu-pointer-static.h"
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #include "urcu-pointer.h"
@@ -50,5 +52,9 @@ void *rcu_xchg_pointer_sym(void **p, void *v)
 void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
 {
        wmb();
-       return uatomic_cmpxchg(p, old, _new);
+       if (likely(URCU_CAS_AVAIL()))
+               return uatomic_cmpxchg(p, old, _new);
+
+       /* Compatibility for i386. Old-timer. */
+       return compat_uatomic_cmpxchg(p, old, _new);
 }
This page took 0.023262 seconds and 4 git commands to generate.