Allow taking address of rcu_read_lock() and rcu_read_unlock()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 3 Jun 2011 16:44:50 +0000 (12:44 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 3 Jun 2011 16:44:50 +0000 (12:44 -0400)
Also incorporate README feedback from Mathieu and Josh.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
README
urcu-bp.h
urcu-qsbr.h
urcu.h

diff --git a/README b/README
index 56e98d7..659511f 100644 (file)
--- a/README
+++ b/README
@@ -205,6 +205,9 @@ Interaction with fork()
        rcu_bp_before_fork, rcu_bp_after_fork_parent and
        rcu_bp_after_fork_child.
 
-       Applications that use call_rcu() are required to invoke
-       call_rcu_after_fork_child() from the child process after a
-       successful fork() system call that is not followed by exec().
+       Applications that use call_rcu() and that fork() without
+       doing an immediate exec() must take special action.  The parent
+       must invoke call_rcu_before_fork() before the fork() and
+       call_rcu_after_fork_parent() after the fork().  The child
+       process must invoke call_rcu_after_fork_child().
+       These three APIs are suitable for passing to pthread_atfork().
index fdf885c..bc2dbc3 100644 (file)
--- a/urcu-bp.h
+++ b/urcu-bp.h
@@ -71,8 +71,8 @@ extern "C" {
  *
  * Mark the beginning and end of a read-side critical section.
  */
-#define rcu_read_lock_bp()             _rcu_read_lock()
-#define rcu_read_unlock_bp()           _rcu_read_unlock()
+#define rcu_read_lock_bp               _rcu_read_lock
+#define rcu_read_unlock_bp             _rcu_read_unlock
 
 #else /* !_LGPL_SOURCE */
 
index 984d70c..7ef1bfe 100644 (file)
@@ -67,12 +67,12 @@ extern "C" {
  * DON'T FORGET TO USE rcu_register_thread/rcu_unregister_thread()
  * FOR EACH THREAD WITH READ-SIDE CRITICAL SECTION.
  */
-#define rcu_read_lock_qsbr()           _rcu_read_lock()
-#define rcu_read_unlock_qsbr()         _rcu_read_unlock()
+#define rcu_read_lock_qsbr             _rcu_read_lock
+#define rcu_read_unlock_qsbr           _rcu_read_unlock
 
-#define rcu_quiescent_state_qsbr()     _rcu_quiescent_state()
-#define rcu_thread_offline_qsbr()      _rcu_thread_offline()
-#define rcu_thread_online_qsbr()       _rcu_thread_online()
+#define rcu_quiescent_state_qsbr       _rcu_quiescent_state
+#define rcu_thread_offline_qsbr                _rcu_thread_offline
+#define rcu_thread_online_qsbr         _rcu_thread_online
 
 #else /* !_LGPL_SOURCE */
 
diff --git a/urcu.h b/urcu.h
index 00d9b75..417e609 100644 (file)
--- a/urcu.h
+++ b/urcu.h
@@ -71,14 +71,14 @@ extern "C" {
  * READ-SIDE CRITICAL SECTION.
  */
 #ifdef RCU_MEMBARRIER
-#define rcu_read_lock_memb()           _rcu_read_lock()
-#define rcu_read_unlock_memb()         _rcu_read_unlock()
+#define rcu_read_lock_memb             _rcu_read_lock
+#define rcu_read_unlock_memb           _rcu_read_unlock
 #elif defined(RCU_SIGNAL)
-#define rcu_read_lock_sig()            _rcu_read_lock()
-#define rcu_read_unlock_sig()          _rcu_read_unlock()
+#define rcu_read_lock_sig              _rcu_read_lock
+#define rcu_read_unlock_sig            _rcu_read_unlock
 #elif defined(RCU_MB)
-#define rcu_read_lock_mb()             _rcu_read_lock()
-#define rcu_read_unlock_mb()           _rcu_read_unlock()
+#define rcu_read_lock_mb               _rcu_read_lock
+#define rcu_read_unlock_mb             _rcu_read_unlock
 #endif
 
 #else /* !_LGPL_SOURCE */
This page took 0.034389 seconds and 4 git commands to generate.