From: Emilio G. Cota Date: Mon, 24 Aug 2015 00:23:41 +0000 (-0400) Subject: linux-user: call rcu_(un)register_thread on pthread_(exit|create) X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=709037636992e9289ce9147e59d56fb35d90b140;p=qemu.git linux-user: call rcu_(un)register_thread on pthread_(exit|create) Signed-off-by: Emilio G. Cota Message-Id: <1440375847-17603-13-git-send-email-cota@braap.org> Signed-off-by: Paolo Bonzini --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f62c698948..732936f0b9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4513,6 +4513,7 @@ static void *clone_func(void *arg) CPUState *cpu; TaskState *ts; + rcu_register_thread(); env = info->env; cpu = ENV_GET_CPU(env); thread_cpu = cpu; @@ -5614,6 +5615,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, thread_cpu = NULL; object_unref(OBJECT(cpu)); g_free(ts); + rcu_unregister_thread(); pthread_exit(NULL); } #ifdef TARGET_GPROF