From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTfZ4-0006vU-H6 for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTfZ1-0000gN-4P for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:42 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTfZ1-0000gB-0r for qemu-devel@nongnu.org; Sun, 23 Aug 2015 20:24:39 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id E1F9720941 for ; Sun, 23 Aug 2015 20:24:38 -0400 (EDT) From: "Emilio G. Cota" Date: Sun, 23 Aug 2015 20:23:41 -0400 Message-Id: <1440375847-17603-13-git-send-email-cota@braap.org> In-Reply-To: <1440375847-17603-1-git-send-email-cota@braap.org> References: <1440375847-17603-1-git-send-email-cota@braap.org> Subject: [Qemu-devel] [RFC 12/38] 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, mttcg@listserver.greensocs.com Cc: mark.burton@greensocs.com, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com, pbonzini@redhat.com, alex.bennee@linaro.org, Frederic Konrad Signed-off-by: Emilio G. Cota --- 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 -- 1.9.1