From patchwork Tue Apr 5 15:32:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 8753161 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0DC8C9F336 for ; Tue, 5 Apr 2016 15:38:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 657FC20381 for ; Tue, 5 Apr 2016 15:38:52 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 749A020382 for ; Tue, 5 Apr 2016 15:38:51 +0000 (UTC) Received: from localhost ([::1]:37852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anT46-0000kP-T6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 05 Apr 2016 11:38:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anSy7-0006jq-UW for qemu-devel@nongnu.org; Tue, 05 Apr 2016 11:32:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anSy4-0007DY-5p for qemu-devel@nongnu.org; Tue, 05 Apr 2016 11:32:39 -0400 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:33758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anSy4-0007DI-0P for qemu-devel@nongnu.org; Tue, 05 Apr 2016 11:32:36 -0400 Received: by mail-wm0-x234.google.com with SMTP id f198so37281919wme.0 for ; Tue, 05 Apr 2016 08:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RpKv+CfaN9b2mbOVrqDgDeKjsgSmxcmW07UhCOA5Ifg=; b=OtI8uxpITjkht9Jusl39PxpTS3M7G/+sKxpkqILwiTrsoUje/LQiws6aj7Rj35Jsji qTB0L4iPFdxoVLMBTi5+9IfmlN4tc+4r/jQZhtiS6+5z57STJAnh1d9mbt7trDOaq4PA jNZ9iRKyzbDgn9S/10AOCiMcmFy4jGiBf7lzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RpKv+CfaN9b2mbOVrqDgDeKjsgSmxcmW07UhCOA5Ifg=; b=PTjYIx79tZzQvdQDHJw+fjTNIUgGZ8w97wkHBAAh8nHdcRTSoXXxxthgcKxxuB9ovV qq7GRZ3QkL1oc9Q/9uji2NwgqQ8Oy3L96FBRttpctcfueS8ho+2V/NwrrkBYKMgipRIO FJhOiqno/U0qT7UHgyCkc18IFGWNoyjR50Lms+ucK0RYk7pSoFZ9v2Gm3WKtsqF5IxZ7 nClF/meJ3QiOAByW2dTUFNBi9NqkJcycqbWEtiijhBUrogAIC6FIlvuP7htFD2fCPx0h PXNJS9WoCmlypqqOcFDyMYWoSTyKitl4kpz6RxmFpDghFgf7HAQczNm959IYyfn0JBOK LBMw== X-Gm-Message-State: AD7BkJJZ1GMyUyal0hGJm6yVmS5P9UbdZBiWq/bdENeJMBtIYIYrq1vfY1FDgNq5y85Wt3UV X-Received: by 10.28.91.83 with SMTP id p80mr19250132wmb.48.1459870355381; Tue, 05 Apr 2016 08:32:35 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w193sm13764709wmd.0.2016.04.05.08.32.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 08:32:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 064F63E047F; Tue, 5 Apr 2016 16:32:33 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: mttcg@listserver.greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, serge.fdrv@gmail.com, cota@braap.org Date: Tue, 5 Apr 2016 16:32:15 +0100 Message-Id: <1459870344-16773-3-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459870344-16773-1-git-send-email-alex.bennee@linaro.org> References: <1459870344-16773-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 Cc: peter.maydell@linaro.org, claudio.fontana@huawei.com, Peter Crosthwaite , jan.kiszka@siemens.com, mark.burton@greensocs.com, qemu-devel@nongnu.org, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Subject: [Qemu-devel] [RFC v2 02/11] cpus: make all_vcpus_paused() return bool X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alex Bennée Reviewed-by: Sergey Fedorov --- cpus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index 8ae4777..e118fdf 100644 --- a/cpus.c +++ b/cpus.c @@ -1248,17 +1248,17 @@ void qemu_mutex_unlock_iothread(void) qemu_mutex_unlock(&qemu_global_mutex); } -static int all_vcpus_paused(void) +static bool all_vcpus_paused(void) { CPUState *cpu; CPU_FOREACH(cpu) { if (!cpu->stopped) { - return 0; + return false; } } - return 1; + return true; } void pause_all_vcpus(void)