add rcu_cmpxchg_pointer
[urcu.git] / urcu.h
diff --git a/urcu.h b/urcu.h
index b46033f29090582749b949f30e2a6d95e2723c79..5d92aa7232d4d0b53d262115fefc470d14286af0 100644 (file)
--- a/urcu.h
+++ b/urcu.h
 #include <stdlib.h>
 #include <pthread.h>
 
+/*
+ * Important !
+ *
+ * Each thread containing read-side critical sections must be registered
+ * with rcu_register_thread() before calling rcu_read_lock().
+ * rcu_unregister_thread() should be called before the thread exits.
+ */
+
 #ifdef _LGPL_SOURCE
 
 #include <urcu-static.h>
@@ -67,6 +75,10 @@ extern void *rcu_assign_pointer_sym(void **p, void *v);
 #define rcu_assign_pointer(p, v)                       \
        rcu_assign_pointer_sym((void **)(p), (v))
 
+extern void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new);
+#define rcu_cmpxchg_pointer(p, old, _new)              \
+       rcu_cmpxchg_pointer_sym((void **)(p), (old), (_new))
+
 extern void *rcu_xchg_pointer_sym(void **p, void *v);
 #define rcu_xchg_pointer(p, v)                         \
        rcu_xchg_pointer_sym((void **)(p), (v))
This page took 0.024949 seconds and 4 git commands to generate.