From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40423 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMFx-0002AZ-JJ for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtMFw-0007RD-GO for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:29 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:42749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtMFw-0007Qr-AY for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:28 -0500 Received: by mail-wy0-f173.google.com with SMTP id 29so2615616wyb.4 for ; Sat, 26 Feb 2011 07:40:28 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sat, 26 Feb 2011 16:39:58 +0100 Message-Id: <1298734819-1960-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> References: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 upstream 01/22] 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: jan.kiszka@siemens.com, aurelien@aurel32.net Signed-off-by: Paolo Bonzini --- os-win32.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/os-win32.c b/os-win32.c index b214e6a..c971d92 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.4