X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-qsbr.c;h=87c83d7fc154443dcee6329cb75abe2a97c33f8e;hp=6ba03642f852763057781dcf14bf2ff4a01dc5b9;hb=2a67ec322b40544b9e4fc5f138629a65b4f20352;hpb=3395d46cc4ab83f9c23ecc5410122111cce5905d diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 6ba0364..87c83d7 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -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();