]> Git Repo - qemu.git/commitdiff
linux-user: call rcu_(un)register_thread on pthread_(exit|create)
authorEmilio G. Cota <[email protected]>
Mon, 24 Aug 2015 00:23:41 +0000 (20:23 -0400)
committerPaolo Bonzini <[email protected]>
Wed, 9 Sep 2015 13:34:54 +0000 (15:34 +0200)
Signed-off-by: Emilio G. Cota <[email protected]>
Message-Id: <1440375847[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
linux-user/syscall.c

index f62c69894899ef3375a9cdf04787657c5fa03105..732936f0b969b1ce05ce575082077d76b632bdab 100644 (file)
@@ -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
This page took 0.028436 seconds and 4 git commands to generate.