From: Mathieu Desnoyers Date: Sun, 8 Dec 2013 15:31:04 +0000 (-0500) Subject: Fix: urcu-bp interaction with threads vs constructors/destructors X-Git-Tag: v0.8.2~15 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=sidebyside;h=c2c36f693a047428c17249482a9c42860a41ff09;hp=c2c36f693a047428c17249482a9c42860a41ff09;p=userspace-rcu.git 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 ---