Map symbols to allow multiple RCU flavors to be used in one binary
[urcu.git] / urcu-bp.h
index d42a2cb24f0739f5bd6cef39328775b106cecace..fdf885c71113d2f4add67ba4354d00bfd20fcfa7 100644 (file)
--- a/urcu-bp.h
+++ b/urcu-bp.h
@@ -9,7 +9,7 @@
  * Slower RCU read-side adapted for tracing library. Does not require thread
  * registration nor unregistration. Also signal-safe.
  *
- * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
  *
  * LGPL-compatible code should include this header with :
  */
 #include <urcu-pointer.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "urcu-bp-map.h"
+
 /*
  * Important !
  *
@@ -65,8 +71,8 @@
  *
  * Mark the beginning and end of a read-side critical section.
  */
-#define rcu_read_lock()                _rcu_read_lock()
-#define rcu_read_unlock()      _rcu_read_unlock()
+#define rcu_read_lock_bp()             _rcu_read_lock()
+#define rcu_read_unlock_bp()           _rcu_read_unlock()
 
 #else /* !_LGPL_SOURCE */
 
@@ -82,6 +88,16 @@ extern void rcu_read_unlock(void);
 
 extern void synchronize_rcu(void);
 
+/*
+ * rcu_bp_before_fork, rcu_bp_after_fork_parent and rcu_bp_after_fork_child
+ * should be called around fork() system calls when the child process is not
+ * expected to immediately perform an exec(). For pthread users, see
+ * pthread_atfork(3).
+ */
+extern void rcu_bp_before_fork(void);
+extern void rcu_bp_after_fork_parent(void);
+extern void rcu_bp_after_fork_child(void);
+
 /*
  * In the bulletproof version, the following functions are no-ops.
  */
@@ -93,8 +109,14 @@ static inline void rcu_unregister_thread(void)
 {
 }
 
-static inline void urcu_init(void)
+static inline void rcu_init(void)
 {
 }
 
+#ifdef __cplusplus 
+}
+#endif
+
+#include "urcu-call-rcu.h"
+
 #endif /* _URCU_BP_H */
This page took 0.02294 seconds and 4 git commands to generate.