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 56e98d768e960ede0a80245a8a1a725218de33d4..659511f7c46eba7260e1297ae247efceaa88b7bf 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 fdf885c71113d2f4add67ba4354d00bfd20fcfa7..bc2dbc370f7f80e0610613078e7417478829265f 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 984d70cab45835f7c5da1dad113c7d6b8383e4a4..7ef1bfef57bba5b77e547887369008a297ef50e4 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 00d9b757ee628ba69c4c294a20f4f842be1a932f..417e609248053c9a4791d9721fcabe5ef7281916 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.027222 seconds and 4 git commands to generate.