Fix call_rcu fork handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 19 Dec 2012 00:31:21 +0000 (19:31 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 9 Jan 2013 18:07:50 +0000 (13:07 -0500)
commit750cfec5f1a025abf67c615f3bdb00c7d9625df5
treea2f8fba149fe959c5d1dcb66003ae3784f8a7a55
parent474cc9a6715f5f2339208a0cc4b3b359aeb401ab
Fix call_rcu fork handling

Fix call_rcu fork handling by putting all call_rcu threads in a
quiescent state before fork (paused state), and unpausing them when the
parent returns from fork.

On the child, everything will run fine as long as we don't issue fork()
from a call_rcu callback.

Side-note: pthread_atfork is not appropriate when using with multithread
and malloc/free. The glibc malloc implementation sadly expects that all
malloc/free are executed from the context of a single thread while
pthread atfork handlers are running, which leads to interesting hang in
glibc.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-call-rcu-impl.h
urcu-call-rcu.h
This page took 0.024742 seconds and 4 git commands to generate.