urcu-qsbr: Add list sanity check at lib exit
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 29 Sep 2009 00:15:29 +0000 (20:15 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 29 Sep 2009 00:15:29 +0000 (20:15 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu-qsbr.c

index c603c1df3e2643939533984d7aee79be7e0b768f..788950675fe8f701de453da3de927caba2a81612 100644 (file)
@@ -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(&registry));
+}
This page took 0.0261479999999999 seconds and 4 git commands to generate.