X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Furcu.c;h=c60307e15351241dbb0158b5d48d589852fcca65;hb=d001c88633f6a58e94eb73f4814976d13f61bd77;hp=cf4d6d03f711750c05e91991f2a64687640b4438;hpb=ea3a28a3f71dd02fb34ed4e3108f93275dbef89a;p=userspace-rcu.git diff --git a/src/urcu.c b/src/urcu.c index cf4d6d0..c60307e 100644 --- a/src/urcu.c +++ b/src/urcu.c @@ -109,11 +109,13 @@ void rcu_init(void) static int init_done; void __attribute__((constructor)) rcu_init(void); -void __attribute__((destructor)) rcu_exit(void); static DEFINE_URCU_TLS(int, rcu_signal_was_blocked); #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(). @@ -696,21 +698,24 @@ void rcu_init(void) urcu_die(errno); } +/* + * 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. + * urcu_posix_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. - * urcu_posix_assert(cds_list_empty(®istry)); - */ + urcu_call_rcu_exit(); } -#endif /* #ifdef RCU_SIGNAL */ - DEFINE_RCU_FLAVOR(rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" +#include "urcu-poll-impl.h"