Fix deadlock in qsbr code
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 10 Jun 2009 16:01:47 +0000 (12:01 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 10 Jun 2009 16:01:47 +0000 (12:01 -0400)
Readers must go offline because they unregister.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu-qsbr.c

index 6ba03642f852763057781dcf14bf2ff4a01dc5b9..87c83d7fc154443dcee6329cb75abe2a97c33f8e 100644 (file)
@@ -258,6 +258,11 @@ void rcu_register_thread(void)
 
 void rcu_unregister_thread(void)
 {
+       /*
+        * We have to make the thread offline otherwise we end up dealocking
+        * with a waiting writer.
+        */
+       _rcu_thread_offline();
        internal_urcu_lock();
        rcu_remove_reader(pthread_self());
        internal_urcu_unlock();
This page took 0.025464 seconds and 4 git commands to generate.