static
void __attribute__((constructor)) _urcu_bp_init(void);
static
-void __attribute__((destructor)) urcu_bp_exit(void);
+void urcu_bp_exit(void);
+static
+void __attribute__((destructor)) urcu_bp_exit_destructor(void);
static void urcu_call_rcu_exit(void);
#ifndef CONFIG_RCU_FORCE_SYS_MEMBARRIER
static
void urcu_bp_exit(void)
{
- urcu_call_rcu_exit();
-
mutex_lock(&init_lock);
if (!--urcu_bp_refcount) {
struct registry_chunk *chunk, *tmp;
mutex_unlock(&init_lock);
}
+static
+void urcu_bp_exit_destructor(void)
+{
+ urcu_call_rcu_exit();
+ urcu_bp_exit();
+}
+
/*
* Holding the rcu_gp_lock and rcu_registry_lock across fork will make
* sure we fork() don't race with a concurrent thread executing with