From patchwork Thu Feb 10 17:37:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 82639 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 BE2BEB7109 for ; Fri, 11 Feb 2011 04:55:20 +1100 (EST) Received: from localhost ([127.0.0.1]:40065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnajd-00071I-1p for incoming@patchwork.ozlabs.org; Thu, 10 Feb 2011 12:55:17 -0500 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:cc:subject:date:message-id :x-mailer:in-reply-to:references; bh=QZr+4PGTlNjslbXruN3cXPvLa76BU9wA895xzrAU+jw=; b=xlHk42zrQTrOXBrldQOBrOjc3GM6UguPDKkV1kXzZQ7kqWurS3CJw2mHuUn9G3BNMN NJzI0Gs5zCtFspfk9D4H4VGsbSixzIh42r2Vsl85M2RlN3cYTLgKhBj2THxsoCJHni39 ZMYc7YmSUSoPBJpzZ5RWqI06dk6XeAzuBBtt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=O+6yCgMmZEWBCeTEhmn2q3t+t7PIPWKAlhLFXa5+aRTjbcTDjqwqoy7lxc7U8XaDcQ S0g1IhcMdzOKs2VgDMoUdXyQah+kYUeVNe9Fsp92TFH96rrE3Mpowj7SJRBYZjRaxYWY WiR2bFPXQLmo5wm9ML8w6e8+0zwyAE+DUT7Qc= Received: by 10.236.103.145 with SMTP id f17mr9726089yhg.47.1297359475823; Thu, 10 Feb 2011 09:37:55 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id 66sm140033yhl.46.2011.02.10.09.37.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Feb 2011 09:37:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 10 Feb 2011 18:37:38 +0100 Message-Id: <1297359464-9789-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.3.5 In-Reply-To: <1297359464-9789-1-git-send-email-pbonzini@redhat.com> References: <1297359464-9789-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.173 Cc: Blue Swirl Subject: [Qemu-devel] [PATCH 1/7] 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 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]);