From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50758 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtzEj-0003Td-JB for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:17:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ptz89-0004iB-EH for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:11:03 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:45960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ptz89-0004do-6V for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:11:01 -0500 Received: by mail-gy0-f173.google.com with SMTP id 8so1782110gyd.4 for ; Mon, 28 Feb 2011 01:11:01 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 28 Feb 2011 10:10:03 +0100 Message-Id: <1298884224-19734-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1298884224-19734-1-git-send-email-pbonzini@redhat.com> References: <1298884224-19734-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v3 uq/master 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: blauwirbel@gmail.com, jan.kiszka@siemes.com, aurelien@aurel32.net, kvm@vger.kernel.org, mtosatti@redhat.com 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