urcu qsbr: move thread online after add reader
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 15 Sep 2009 18:13:09 +0000 (14:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 15 Sep 2009 18:13:09 +0000 (14:13 -0400)
For a matter of symmetry with the unregister, make thread online only after it
has been added as reader.

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

index 878a550b9291d21a464f5e4c1db9e58f1d741ea3..0576f4142754e14840b839be35c71e72b200938a 100644 (file)
@@ -251,10 +251,10 @@ static void rcu_remove_reader(pthread_t id)
 
 void rcu_register_thread(void)
 {
-       _rcu_thread_online();
        internal_urcu_lock();
        rcu_add_reader(pthread_self());
        internal_urcu_unlock();
+       _rcu_thread_online();
 }
 
 void rcu_unregister_thread(void)
This page took 0.024999 seconds and 4 git commands to generate.