summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2015-08-23 20:23:41 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-09 15:34:54 +0200
commit709037636992e9289ce9147e59d56fb35d90b140 (patch)
tree9a2f5ba0523a1dd70d65c0c62f29a21fb1fae72e /linux-user
parent492e1ca9bd3f43ba417a5cf918e6c769aa2478b9 (diff)
downloadhqemu-709037636992e9289ce9147e59d56fb35d90b140.zip
hqemu-709037636992e9289ce9147e59d56fb35d90b140.tar.gz
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')
-rw-r--r--linux-user/syscall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f62c698..732936f 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
OpenPOWER on IntegriCloud