X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-bp.h;h=efb5dca8f92c1186b2187bbfa8ee40f9fa911ab4;hp=0ea53e194d01c247539eb7acd96a1f89ab7050d5;hb=541d828d3101283ccdb1e25fa5a885e1d1743c1a;hpb=02be55611d3b1c7bf4fdfcb3a9c98f621882d417 diff --git a/urcu-bp.h b/urcu-bp.h index 0ea53e1..efb5dca 100644 --- 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 + * Copyright (c) 2009 Mathieu Desnoyers * Copyright (c) 2009 Paul E. McKenney, IBM Corporation. * * LGPL-compatible code should include this header with : @@ -38,7 +38,8 @@ #include /* - * See urcu-pointer.h and urcu-pointer-static.h for pointer publication headers. + * See urcu-pointer.h and urcu/static/urcu-pointer.h for pointer + * publication headers. */ #include @@ -46,6 +47,8 @@ extern "C" { #endif +#include + /* * Important ! * @@ -56,7 +59,7 @@ extern "C" { #ifdef _LGPL_SOURCE -#include +#include /* * Mappings for static use of the userspace RCU library. @@ -69,14 +72,14 @@ extern "C" { * * 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 */ /* * library wrappers to be used by non-LGPL compatible source code. - * See LGPL-only urcu-pointer-static.h for documentation. + * See LGPL-only urcu/static/urcu-pointer.h for documentation. */ extern void rcu_read_lock(void); @@ -86,6 +89,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. */ @@ -101,8 +114,27 @@ static inline void rcu_init(void) { } +/* + * Q.S. reporting are no-ops for these URCU flavors. + */ +static inline void rcu_quiescent_state(void) +{ +} + +static inline void rcu_thread_offline(void) +{ +} + +static inline void rcu_thread_online(void) +{ +} + #ifdef __cplusplus } #endif +#include +#include +#include + #endif /* _URCU_BP_H */