From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6N0g-0007KY-Pf for qemu-devel@nongnu.org; Wed, 21 Sep 2011 09:38:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6N0f-0006x6-Ol for qemu-devel@nongnu.org; Wed, 21 Sep 2011 09:38:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6N0f-0006wx-CP for qemu-devel@nongnu.org; Wed, 21 Sep 2011 09:38:45 -0400 Message-ID: <4E79E8E1.8000804@redhat.com> Date: Wed, 21 Sep 2011 15:38:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <3beaa0c559cd7f2df1299e7385a8997165c0f851.1316537591.git.jan.kiszka@siemens.com> <4E798F66.4070809@redhat.com> <4E79E94C.6040708@redhat.com> In-Reply-To: <4E79E94C.6040708@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] Enable joinable POSIX threads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Jan Kiszka , Anthony Liguori , Alon Levy , qemu-devel@nongnu.org On 09/21/2011 03:40 PM, Kevin Wolf wrote: >> > >> > I think these two should be joinable. Otherwise, you might be >> > destroying the apdu_thread_quit_mutex while the handle_apdu_thread >> > hasn't yet finished unlocking it (even though it already progressed >> > enough in qemu_mutex_destroy to release the main thread). >> > >> > Anyhow, the bug is not introduced by your patch, so >> > >> > Reviewed-by: Paolo Bonzini > Actually, the man page says that joinable is the default, so this patch > does change the behaviour. Yes, but it doesn't change the fact that mutexes are destroyed under the thread's feet. i.e. it doesn't introduce the race. Paolo