X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-qsbr.c;h=788950675fe8f701de453da3de927caba2a81612;hp=c603c1df3e2643939533984d7aee79be7e0b768f;hb=f6d18c6478b943f852d1a70fcae165fad08f019a;hpb=4f8e33808fdc08d3182a656d509fe42487d19b86 diff --git a/urcu-qsbr.c b/urcu-qsbr.c index c603c1d..7889506 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -37,6 +37,8 @@ /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ #include "urcu-qsbr.h" +void __attribute__((destructor)) rcu_exit(void); + static pthread_mutex_t urcu_mutex = PTHREAD_MUTEX_INITIALIZER; int gp_futex; @@ -333,3 +335,8 @@ void rcu_unregister_thread(void) list_del(&urcu_reader.head); internal_urcu_unlock(); } + +void rcu_exit(void) +{ + assert(list_empty(®istry)); +}