X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Furcu.c;fp=src%2Furcu.c;h=d81e84fde88e27de5c6ac28145c03cc5c6cf989d;hb=457eeeee4e2694bdd284a186405088f5ccdc6fa9;hp=a8c033a0bb7c960755428ec7a3caeff6b3f309e7;hpb=232cf6ac1955d43d6feb5d571a64bf04dd380dd2;p=urcu.git diff --git a/src/urcu.c b/src/urcu.c index a8c033a..d81e84f 100644 --- a/src/urcu.c +++ b/src/urcu.c @@ -113,9 +113,11 @@ void alias_rcu_init(void); static int init_done; void __attribute__((constructor)) rcu_init(void); -void __attribute__((destructor)) rcu_exit(void); #endif +void __attribute__((destructor)) rcu_exit(void); +static void urcu_call_rcu_exit(void); + /* * rcu_gp_lock ensures mutual exclusion between threads calling * synchronize_rcu(). @@ -671,22 +673,24 @@ void rcu_init(void) URCU_ATTR_ALIAS(urcu_stringify(rcu_init)) void alias_rcu_init(void); +/* + * Don't unregister the SIGRCU signal handler anymore, because + * call_rcu threads could still be using it shortly before the + * application exits. + * Assertion disabled because call_rcu threads are now rcu + * readers, and left running at exit. + * assert(cds_list_empty(®istry)); + */ + +#endif /* #ifdef RCU_SIGNAL */ + void rcu_exit(void) { - /* - * Don't unregister the SIGRCU signal handler anymore, because - * call_rcu threads could still be using it shortly before the - * application exits. - * Assertion disabled because call_rcu threads are now rcu - * readers, and left running at exit. - * assert(cds_list_empty(®istry)); - */ + urcu_call_rcu_exit(); } URCU_ATTR_ALIAS(urcu_stringify(rcu_exit)) void alias_rcu_exit(void); -#endif /* #ifdef RCU_SIGNAL */ - DEFINE_RCU_FLAVOR(rcu_flavor); DEFINE_RCU_FLAVOR_ALIAS(rcu_flavor, alias_rcu_flavor);