X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Furcu-bp.h;h=7eefa0ea70e2eb832e712338890db1e7d4710798;hb=111bda8f5fa6ff4d5d50605ccbe56d9622498ef4;hp=7b00aaa8d555130f2b2dcf733344571931624c24;hpb=4477a87021ffbfbfdb2a2084d05a084171343d36;p=urcu.git diff --git a/include/urcu/urcu-bp.h b/include/urcu/urcu-bp.h index 7b00aaa..7eefa0e 100644 --- a/include/urcu/urcu-bp.h +++ b/include/urcu/urcu-bp.h @@ -36,10 +36,7 @@ #include #include - -#ifdef __cplusplus -extern "C" { -#endif +#include #include @@ -52,10 +49,15 @@ extern "C" { */ /* - * See urcu-pointer.h and urcu/static/urcu-pointer.h for pointer + * See urcu/pointer.h and urcu/static/pointer.h for pointer * publication headers. */ -#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif #ifdef _LGPL_SOURCE @@ -85,7 +87,7 @@ extern "C" { /* * library wrappers to be used by non-LGPL compatible source code. - * See LGPL-only urcu/static/urcu-pointer.h for documentation. + * See LGPL-only urcu/static/pointer.h for documentation. */ extern void urcu_bp_read_lock(void); @@ -140,6 +142,12 @@ extern void *urcu_bp_set_pointer_sym(void **p, void *v); extern void urcu_bp_synchronize_rcu(void); +/* + * RCU grace period polling API. + */ +extern struct urcu_gp_poll_state urcu_bp_start_poll_synchronize_rcu(void); +extern bool urcu_bp_poll_state_synchronize_rcu(struct urcu_gp_poll_state state); + /* * urcu_bp_before_fork, urcu_bp_after_fork_parent and urcu_bp_after_fork_child * should be called around fork() system calls when the child process is not @@ -151,12 +159,14 @@ extern void urcu_bp_after_fork_parent(void); extern void urcu_bp_after_fork_child(void); /* - * In the bulletproof version, the following functions are no-ops. + * In the bulletproof version, thread registration is performed lazily, + * but it can be forced by issuing an explicit urcu_bp_register_thread(). */ -static inline void urcu_bp_register_thread(void) -{ -} +extern void urcu_bp_register_thread(void); +/* + * In the bulletproof version, the following functions are no-ops. + */ static inline void urcu_bp_unregister_thread(void) { } @@ -184,9 +194,9 @@ static inline void urcu_bp_thread_online(void) } #endif -#include -#include -#include +#include +#include +#include #ifndef URCU_API_MAP #include