mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
492e1ca9bd
commit
7090376369
|
@ -4513,6 +4513,7 @@ static void *clone_func(void *arg)
|
||||||
CPUState *cpu;
|
CPUState *cpu;
|
||||||
TaskState *ts;
|
TaskState *ts;
|
||||||
|
|
||||||
|
rcu_register_thread();
|
||||||
env = info->env;
|
env = info->env;
|
||||||
cpu = ENV_GET_CPU(env);
|
cpu = ENV_GET_CPU(env);
|
||||||
thread_cpu = cpu;
|
thread_cpu = cpu;
|
||||||
|
@ -5614,6 +5615,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
thread_cpu = NULL;
|
thread_cpu = NULL;
|
||||||
object_unref(OBJECT(cpu));
|
object_unref(OBJECT(cpu));
|
||||||
g_free(ts);
|
g_free(ts);
|
||||||
|
rcu_unregister_thread();
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
#ifdef TARGET_GPROF
|
#ifdef TARGET_GPROF
|
||||||
|
|
Loading…
Reference in New Issue