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: 594821 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1S9Blsx007299 for ; Mon, 28 Feb 2011 09:11:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051Ab1B1JLk (ORCPT ); Mon, 28 Feb 2011 04:11:40 -0500 Received: from mail-yi0-f46.google.com ([209.85.218.46]:54293 "EHLO mail-yi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753003Ab1B1JLT (ORCPT ); Mon, 28 Feb 2011 04:11:19 -0500 Received: by mail-yi0-f46.google.com with SMTP id 27so564167yia.19 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 Cc: kvm@vger.kernel.org, aurelien@aurel32.net, blauwirbel@gmail.com, jan.kiszka@siemes.com, mtosatti@redhat.com Subject: [PATCH v3 uq/master 17/22] do not use timedwait on qemu_cpu_cond 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Feb 2011 09:11:47 +0000 (UTC) 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); } }