From patchwork Fri Jun 3 20:40:10 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: 9153995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9BC806082E for ; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E46D28333 for ; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82D862832F; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A30A2832F for ; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) Received: from localhost ([::1]:57625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vu1-0008Qy-3S for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Jun 2016 16:41:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtU-0008Pq-OX for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8vtP-0000OO-8d for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:36 -0400 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:38048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtO-0000Nt-Tv for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:31 -0400 Received: by mail-wm0-x232.google.com with SMTP id m124so4109462wme.1 for ; Fri, 03 Jun 2016 13:40:30 -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=DJi5GqYLR9QbnaS724C8S1e4gFX0/y9Uy2ATqOSzmKA=; b=CFCVOu/6SPOvsHbaXhgUkeBE08+M1i1Om7wx68qA445orTKOM4Y10e0uTy7vq7C6yV YU1YCDyCRavIC/1nksQG2RZd0CW1+VhC2TlCzzOGTablQwCeFfkDBxLJlGMy8d4ej1m/ gldUzLzF4zJgjZvntKWnZR+SJPPQJIrAc54TI= 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=DJi5GqYLR9QbnaS724C8S1e4gFX0/y9Uy2ATqOSzmKA=; b=iQRBhh+v9X+lheTI8y5XWaq4q7dNtvHlD+CzuWyENHtGXrmlFkkLubod74l8OfHDRC lB0eWYYCIsMBF3pwYthUjF+3I3x2Xerz4bgOLhB/nysFyNJ+jpEnm6fToc2S6wRAhRrF 97kVGTuvKRgfqdY1TsDCRyb3zJ2BXn26HUOOKP3SEUK4dElqIm/MuxtmRBGCjBscx2Tg 5oleXWA4vh46+ulq9yhE/pQV0TEuKc3IlFReZ2IzmTVzJauAha3Z+1W/sUrJb8YOikQX RNZqAGjgTfU1hTQuFHWQlisR6okhZGwIxr8ezNFkKYMyDIbE4+eGX4qHqQ4lD6JY7Cjy EfTw== X-Gm-Message-State: ALyK8tLJ+VKAd4Am6N3eS8ZSDsCpt2nJY7oW8+xOQTOqfX01SRVJZejkUrSSBoJkMA/uaJlQ X-Received: by 10.195.11.34 with SMTP id ef2mr2856706wjd.67.1464986430134; Fri, 03 Jun 2016 13:40:30 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h2sm7382483wjv.15.2016.06.03.13.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 13:40:27 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 571BC3E0B11; Fri, 3 Jun 2016 21:40:39 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: mttcg@listserver.greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, serge.fdrv@gmail.com, cota@braap.org, bobby.prani@gmail.com Date: Fri, 3 Jun 2016 21:40:10 +0100 Message-Id: <1464986428-6739-2-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464986428-6739-1-git-send-email-alex.bennee@linaro.org> References: <1464986428-6739-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::232 Subject: [Qemu-devel] [RFC v3 01/19] cpus: make all_vcpus_paused() return bool X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Peter Crosthwaite , claudio.fontana@huawei.com, mark.burton@greensocs.com, jan.kiszka@siemens.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alex Bennée Reviewed-by: Sergey Fedorov Reviewed-by: Richard Henderson --- v3 - add r-b tags --- cpus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index 665f9bb..c404dd7 100644 --- a/cpus.c +++ b/cpus.c @@ -1258,17 +1258,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)