Re: [Qemu-devel] [RFC 08/38] rcu: init rcu_registry_lock after fork

2015-09-09 Thread Alex Bennée
Emilio G. Cota writes: > On Tue, Sep 08, 2015 at 18:34:38 +0100, Alex Bennée wrote: >> Emilio G. Cota writes: > (snip) >> > +static void rcu_init_child(void) >> > +{ >> > +qemu_mutex_init(&rcu_registry_lock); >> > +} >> > #endif >> > >> > void rcu_after_fork(void) >> > @@ -346,7 +351,7

Re: [Qemu-devel] [RFC 08/38] rcu: init rcu_registry_lock after fork

2015-09-08 Thread Emilio G. Cota
On Tue, Sep 08, 2015 at 18:34:38 +0100, Alex Bennée wrote: > Emilio G. Cota writes: (snip) > > +static void rcu_init_child(void) > > +{ > > +qemu_mutex_init(&rcu_registry_lock); > > +} > > #endif > > > > void rcu_after_fork(void) > > @@ -346,7 +351,7 @@ void rcu_after_fork(void) > > stati

Re: [Qemu-devel] [RFC 08/38] rcu: init rcu_registry_lock after fork

2015-09-08 Thread Alex Bennée
Emilio G. Cota writes: > We were unlocking this lock after fork, which is wrong since > only the thread that holds a mutex is allowed to unlock it. > > Signed-off-by: Emilio G. Cota > --- > util/rcu.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/util/rcu.c b/u

[Qemu-devel] [RFC 08/38] rcu: init rcu_registry_lock after fork

2015-08-23 Thread Emilio G. Cota
We were unlocking this lock after fork, which is wrong since only the thread that holds a mutex is allowed to unlock it. Signed-off-by: Emilio G. Cota --- util/rcu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/rcu.c b/util/rcu.c index 8ba304d..47c2bce 100644 --