From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjdKT-0005iA-GE for qemu-devel@nongnu.org; Tue, 17 Mar 2009 13:43:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjdKO-0005h4-P1 for qemu-devel@nongnu.org; Tue, 17 Mar 2009 13:43:52 -0400 Received: from [199.232.76.173] (port=33318 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjdKO-0005h1-Lp for qemu-devel@nongnu.org; Tue, 17 Mar 2009 13:43:48 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56613) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjdKK-0006Wa-MF for qemu-devel@nongnu.org; Tue, 17 Mar 2009 13:43:47 -0400 Date: Tue, 17 Mar 2009 14:42:17 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [patch 1/2] qemu: sem/thread helpers Message-ID: <20090317174217.GA10492@amt.cnet> References: <20090311161645.344003675@localhost.localdomain> <20090311161942.482576079@localhost.localdomain> <49BD0D98.8050803@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49BD0D98.8050803@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori On Sun, Mar 15, 2009 at 04:15:52PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: >> + >> +struct QemuSem { >> + sem_t sema; >> +}; >> > > Why aren't you using pthread_mutex_t? Because we want the thread waiting on the lock to be awakened once the holder releases it. This does not happen with pthread mutexes AFAIK.