From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqlT5-0001hz-Fb for qemu-devel@nongnu.org; Mon, 16 Jul 2012 09:36:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqlT3-00055I-MT for qemu-devel@nongnu.org; Mon, 16 Jul 2012 09:36:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqlT3-000551-EW for qemu-devel@nongnu.org; Mon, 16 Jul 2012 09:36:05 -0400 Message-ID: <500418BC.8080200@redhat.com> Date: Mon, 16 Jul 2012 15:35:56 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1342435377-25897-1-git-send-email-pbonzini@redhat.com> <1342435377-25897-8-git-send-email-pbonzini@redhat.com> <50040251.5000700@siemens.com> <50041510.5070105@redhat.com> <50041869.20006@siemens.com> In-Reply-To: <50041869.20006@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/12] qemu-thread: add QemuSemaphore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: "kwolf@redhat.com" , "aliguori@linux.vnet.ibm.com" , "sw@weilnetz.de" , "qemu-devel@nongnu.org" , "stefanha@linux.vnet.ibm.com" Il 16/07/2012 15:34, Jan Kiszka ha scritto: > On 2012-07-16 15:20, Paolo Bonzini wrote: >> Il 16/07/2012 14:00, Jan Kiszka ha scritto: >>> On 2012-07-16 12:42, Paolo Bonzini wrote: >>>> The new thread pool will use semaphores instead of condition >>>> variables, because QemuCond does not have qemu_cond_timedwait. >>> >>> I'll post an updated patch (according to last round's review comments) >>> that adds this service for POSIX. I bet you'll find a way to extend it >>> to Win32 if that is required. ;) >> >> I can do that (or just use pthreads-win32), but only at the cost of >> making cond_wait() slower and more complex. > > Why will it affect cond_wait? WaitForSingleObject can time out as well. qemu_cond_wait only uses WaitForSingleObject with INFINITE timeout, and the algorithm relies on that. Paolo