diff options
author | Emilio G. Cota | 2015-08-24 02:23:41 +0200 |
---|---|---|
committer | Paolo Bonzini | 2015-09-09 15:34:54 +0200 |
commit | 709037636992e9289ce9147e59d56fb35d90b140 (patch) | |
tree | 9a2f5ba0523a1dd70d65c0c62f29a21fb1fae72e /linux-user/syscall.c | |
parent | rcu: fix comment with s/rcu_gp_lock/rcu_registry_lock/ (diff) | |
download | qemu-709037636992e9289ce9147e59d56fb35d90b140.tar.gz qemu-709037636992e9289ce9147e59d56fb35d90b140.tar.xz qemu-709037636992e9289ce9147e59d56fb35d90b140.zip |
linux-user: call rcu_(un)register_thread on pthread_(exit|create)
Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1440375847-17603-13-git-send-email-cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |