Fix: urcu-bp interaction with threads vs constructors/destructors
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 8 Dec 2013 15:31:04 +0000 (10:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 8 Dec 2013 15:37:12 +0000 (10:37 -0500)
commit48bf2f76e0f1fe9a778359a8291134f80ce3e79a
treedda684eca3b05b298bc4f2d81a2ff9553588f438
parent63334ffb3ed3effe3824a8e952556ce687a7fd28
Fix: urcu-bp interaction with threads vs constructors/destructors

Add a reference counter for threads using urcu-bp, thus ensuring that
even if the urcu destructor is executed before each thread using RCU
read-side critical sections exit, those threads will not see a corrupted
thread list.

Also, don't use URCU_TLS() within urcu_bp_thread_exit_notifier(). It
appears that this is racy (although this was probably due to the issue
fixed by reference counting). Anyway, play safe, and pass the rcu_key
received as parameter instead.

Those issues only reproduce when threads are still active when the
urcu-bp destructor is called.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-bp.c
This page took 0.025019 seconds and 4 git commands to generate.