From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta0sj-0007qs-01 for qemu-devel@nongnu.org; Sun, 18 Nov 2012 04:09:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ta0sf-0001XW-T8 for qemu-devel@nongnu.org; Sun, 18 Nov 2012 04:09:36 -0500 Received: from speedy.comstyle.com ([206.51.28.2]:32235 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta0sf-0001Wy-Oi for qemu-devel@nongnu.org; Sun, 18 Nov 2012 04:09:33 -0500 Message-ID: <50A8A5BF.3060906@comstyle.com> Date: Sun, 18 Nov 2012 04:09:19 -0500 From: Brad Smith MIME-Version: 1.0 References: <1351862047-23172-1-git-send-email-pbonzini@redhat.com> <1351862047-23172-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351862047-23172-3-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] semaphore: implement fallback counting semaphores with mutex+condvar List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: blauwirbel@gmail.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, peter.maydell@linaro.org On 11/02/12 09:14, Paolo Bonzini wrote: > OpenBSD and Darwin do not have sem_timedwait. Implement a fallback > for them. > > Signed-off-by: Paolo Bonzini > --- > qemu-thread-posix.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > qemu-thread-posix.h | 6 +++++ > 2 file modificati, 80 inserzioni(+) > > diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c > index 6a3d3a1..048db8f 100644 > --- a/qemu-thread-posix.c > +++ b/qemu-thread-posix.c > @@ -122,36 +122,100 @@ void qemu_sem_init(QemuSemaphore *sem, int init) > { > int rc; > > +#if defined(__OpenBSD__) || defined(__APPLE__) || defined(__NetBSD__) OpenBSD 5.2 & -current (libpthread) / NetBSD -current (librt) have supported sem_timedwait() for roughly 8 months now. Please change this to properly test for the presence of sem_timedwait() within the configure script. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.