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>
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().
*
* 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 */
* 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 */
* 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 */