From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZfm2-00064C-Tr for qemu-devel@nongnu.org; Wed, 09 Sep 2015 09:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZflx-0003Gi-Ub for qemu-devel@nongnu.org; Wed, 09 Sep 2015 09:50:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZflx-0003GI-Kd for qemu-devel@nongnu.org; Wed, 09 Sep 2015 09:50:49 -0400 From: Paolo Bonzini Date: Wed, 9 Sep 2015 15:49:51 +0200 Message-Id: <1441806613-13775-22-git-send-email-pbonzini@redhat.com> In-Reply-To: <1441806613-13775-1-git-send-email-pbonzini@redhat.com> References: <1441806613-13775-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 21/43] linux-user: call rcu_(un)register_thread on pthread_(exit|create) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Emilio G. Cota" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <1440375847-17603-13-git-send-email-cota@braap.org> Signed-off-by: Paolo Bonzini --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.4.3