From patchwork Sat Feb 26 15:40:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 84662 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 679E8B70B3 for ; Sun, 27 Feb 2011 03:12:29 +1100 (EST) Received: from localhost ([127.0.0.1]:53356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMVW-0001fL-20 for incoming@patchwork.ozlabs.org; Sat, 26 Feb 2011 10:56:34 -0500 Received: from [140.186.70.92] (port=40819 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtMGO-0002Ur-Sh for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtMGN-0007cR-Nh for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:56 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:41779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtMGN-0007RV-I4 for qemu-devel@nongnu.org; Sat, 26 Feb 2011 10:40:55 -0500 Received: by mail-ww0-f53.google.com with SMTP id 29so366964wwb.10 for ; Sat, 26 Feb 2011 07:40:55 -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=MPRHP5HFAyldj9B8uZU1pbNISdJrT9rKpqHCRNZU9FHo1ekKvycovK/zJ1KyTZxTaO D0ETEto7Oe7yE6d8QnVSbpeU9nIH1Y6LoipkldLeBGlvJ78HQOoMM19HOit4inP1Ith1 QXXH2DQPf4fHGNLJ4Dw6tvawylI/JGejxFJ4Y= 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=bwkoGB+XQQ1X+z3nDRLPLSaD/VlifP89aw3XRy4TG2J8lIWdDSL1E5vADS7GxQzR+j P86AHRKm7wXjWAdBwpz0QAXiDorlDRAazmKeX0t1i268LhIT69LY6QylRi345EHrXuOP QPqaItZuIIN2rCMHJIpdOhZPtvgwTVm8VVJU8= Received: by 10.227.157.141 with SMTP id b13mr3232762wbx.96.1298734855021; Sat, 26 Feb 2011 07:40: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 f27sm1592788wbf.1.2011.02.26.07.40.53 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 26 Feb 2011 07:40:54 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 26 Feb 2011 16:40:14 +0100 Message-Id: <1298734819-1960-18-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1298734819-1960-1-git-send-email-pbonzini@redhat.com> References: <1298734819-1960-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.53 Cc: jan.kiszka@siemens.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v2 upstream 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); } }