urcu-defer: fix futex wakeup value
[urcu.git] / urcu.c
diff --git a/urcu.c b/urcu.c
index 07537efbc55c90943b49f1a240aab5935fc55bc7..32f74880492ce40527c8b5b40560249eac485b90 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -37,6 +37,8 @@
 #include "urcu.h"
 
 #ifndef URCU_MB
+static int init_done;
+
 void __attribute__((constructor)) urcu_init(void);
 void __attribute__((destructor)) urcu_exit(void);
 #else
@@ -45,9 +47,7 @@ void urcu_init(void)
 }
 #endif
 
-int init_done;
-
-pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 /*
  * Global grace period counter.
@@ -81,7 +81,7 @@ static struct reader_registry *registry;
 static char __thread need_mb;
 static int num_readers, alloc_readers;
 
-void internal_urcu_lock(void)
+static void internal_urcu_lock(void)
 {
        int ret;
 
@@ -108,7 +108,7 @@ void internal_urcu_lock(void)
 #endif /* #else #ifndef DISTRUST_SIGNALS_EXTREME */
 }
 
-void internal_urcu_unlock(void)
+static void internal_urcu_unlock(void)
 {
        int ret;
 
@@ -347,6 +347,12 @@ void *rcu_xchg_pointer_sym(void **p, void *v)
        return xchg(p, v);
 }
 
+void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
+{
+       wmb();
+       return cmpxchg(p, old, _new);
+}
+
 void *rcu_publish_content_sym(void **p, void *v)
 {
        void *oldptr;
This page took 0.02298 seconds and 4 git commands to generate.