From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49613 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnaf2-0004a4-Iv for qemu-devel@nongnu.org; Thu, 10 Feb 2011 12:50:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pnaf1-0000h9-8V for qemu-devel@nongnu.org; Thu, 10 Feb 2011 12:50:32 -0500 Received: from mail-gx0-f173.google.com ([209.85.161.173]:52805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnaV0-0005XN-0V for qemu-devel@nongnu.org; Thu, 10 Feb 2011 12:40:10 -0500 Received: by gxk28 with SMTP id 28so758217gxk.4 for ; Thu, 10 Feb 2011 09:40:09 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 10 Feb 2011 18:37:38 +0100 Message-Id: <1297359464-9789-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1297359464-9789-1-git-send-email-pbonzini@redhat.com> References: <1297359464-9789-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/7] unlock iothread during WaitForMultipleObjects List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl Signed-off-by: Paolo Bonzini Cc: Stefan Weil Cc: Blue Swirl --- os-win32.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/os-win32.c b/os-win32.c index 566d5e9..d907c59 100644 --- a/os-win32.c +++ b/os-win32.c @@ -140,7 +140,9 @@ void os_host_main_loop_wait(int *timeout) int err; WaitObjects *w = &wait_objects; + qemu_mutex_unlock_iothread(); ret = WaitForMultipleObjects(w->num, w->events, FALSE, *timeout); + qemu_mutex_lock_iothread(); if (WAIT_OBJECT_0 + 0 <= ret && ret <= WAIT_OBJECT_0 + w->num - 1) { if (w->func[ret - WAIT_OBJECT_0]) w->func[ret - WAIT_OBJECT_0](w->opaque[ret - WAIT_OBJECT_0]); -- 1.7.3.5