From patchwork Mon Feb 28 09:10:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 84764 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 B1DA9B70A4 for ; Mon, 28 Feb 2011 21:15:51 +1100 (EST) Received: from localhost ([127.0.0.1]:36349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pu08n-0008MD-OV for incoming@patchwork.ozlabs.org; Mon, 28 Feb 2011 05:15:45 -0500 Received: from [140.186.70.92] (port=45374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtzEk-0005xo-HP for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:17:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ptz8R-0004lc-7d for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:11:23 -0500 Received: from mail-yi0-f45.google.com ([209.85.218.45]:49455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ptz8R-0004fa-5E for qemu-devel@nongnu.org; Mon, 28 Feb 2011 04:11:19 -0500 Received: by mail-yi0-f45.google.com with SMTP id 19so673105yib.4 for ; Mon, 28 Feb 2011 01:11:19 -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=ndu7T7S88oT2CoXmKe34xFK9pL22l7fPFR1eGfXKMmI=; b=PF1so/h4ERPxA63BgPsROC1FQH7inJWqUHFUjrv+Un2PuYiP7G64WkWTmPy8uQ3NBg gJEjQgtUyrZHzrznYVWZAURW2IwhrxSLT2wEqHFSlPlO02ShgukLsxdfL5ULI7gPoQRc SqKmMIDDvdyk+bgUYHXO8pHntxLrCLxhG9CEw= 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=aElYdMCS7zB776Zd4uaMxEjbCPpuW79krFdSQyfAY+uQiuZgsgWTL/sx+xQN6Q4VTK I8tQgANbQUbmVsZy+3eDr8aEzzhXV3Mvd4gkyY16vmgWeomoFIhPdYnUOe/Wrz18Beeq g0xS0kN/ho1hYVYN6F60y7DlHRVOUwqoNjcBw= Received: by 10.236.182.2 with SMTP id n2mr9257166yhm.17.1298884279059; Mon, 28 Feb 2011 01:11:19 -0800 (PST) Received: from localhost.localdomain (93-34-149-100.ip50.fastwebnet.it [93.34.149.100]) by mx.google.com with ESMTPS id 1sm2037209yhl.11.2011.02.28.01.11.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 01:11:18 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 28 Feb 2011 10:10:19 +0100 Message-Id: <1298884224-19734-18-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1298884224-19734-1-git-send-email-pbonzini@redhat.com> References: <1298884224-19734-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.218.45 Cc: blauwirbel@gmail.com, jan.kiszka@siemes.com, aurelien@aurel32.net, kvm@vger.kernel.org, mtosatti@redhat.com Subject: [Qemu-devel] [PATCH v3 uq/master 17/22] do not use timedwait on qemu_cpu_cond 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 Whenever env->created becomes true, qemu_cpu_cond is signaled by {kvm,tcg}_cpu_thread_fn. Signed-off-by: Paolo Bonzini --- cpus.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 8f169ad..4305184 100644 --- a/cpus.c +++ b/cpus.c @@ -970,7 +970,7 @@ static void qemu_tcg_init_vcpu(void *_env) qemu_cond_init(env->halt_cond); qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env); while (env->created == 0) { - qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100); + qemu_cond_wait(&qemu_cpu_cond, &qemu_global_mutex); } tcg_cpu_thread = env->thread; tcg_halt_cond = env->halt_cond; @@ -987,7 +987,7 @@ static void qemu_kvm_start_vcpu(CPUState *env) qemu_cond_init(env->halt_cond); qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env); while (env->created == 0) { - qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100); + qemu_cond_wait(&qemu_cpu_cond, &qemu_global_mutex); } }