From patchwork Mon Feb 21 08:43:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 83782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4634AB7132 for ; Mon, 21 Feb 2011 19:49:47 +1100 (EST) Received: from localhost ([127.0.0.1]:41573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrRSi-00063H-GV for incoming@patchwork.ozlabs.org; Mon, 21 Feb 2011 03:49:44 -0500 Received: from [140.186.70.92] (port=49086 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrRN2-0004ef-1a for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:43:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrRN0-0000IH-UL for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:43:51 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:61006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrRN0-0000I2-OW for qemu-devel@nongnu.org; Mon, 21 Feb 2011 03:43:50 -0500 Received: by mail-wy0-f173.google.com with SMTP id 29so1150726wyb.4 for ; Mon, 21 Feb 2011 00:43:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=AvxggdhXsjd3xZOJTjQ9+SpZXKAgYyeZT74B9IuhU0o=; b=xsH1KcHUJpnDVxhMLfj7R3JUd06K1DbJvy5u8FL7vgNyQ5YHcrGvU9LR/YiAUjlIQM 4bI6ysVFAukn1ay4aivJMJp41N/DlIdaL5/u+dTr/jrT4O5dt1kuFFbaNW5L1ynwGr14 PVekYSU/Xo3eIuxtct/cMcvIDlfvpvrnFtO/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=UQTVwGkrFZvaDUhFlSqILQ7/y8KeylII4e+AroN0R28+cCG1ov/zLQdet0m1kOugJm R4fNMRkZezz95//Mw17KFAucipcVyrdAujw1h7W4cMfe2Xa/wMWailUO5qzMsBtXiRwx VnorSuY/KoydCYxxtXPvN2uuKVVrigv6Lsg34= Received: by 10.227.132.69 with SMTP id a5mr900139wbt.123.1298277830031; Mon, 21 Feb 2011 00:43:50 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id t5sm1945464wes.9.2011.02.21.00.43.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Feb 2011 00:43:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 21 Feb 2011 09:43:20 +0100 Message-Id: <1298277820-8817-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: <1298277820-8817-1-git-send-email-pbonzini@redhat.com> References: <1298277820-8817-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.173 Subject: [Qemu-devel] [PATCH 01/21] unlock iothread during WaitForMultipleObjects X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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]);