From nobody Mon Feb 9 09:33:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500520293798233.77852869333276; Wed, 19 Jul 2017 20:11:33 -0700 (PDT) Received: from localhost ([::1]:35803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY1sB-0002SW-4n for importer@patchew.org; Wed, 19 Jul 2017 23:11:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY1qM-00016J-9u for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dY1qJ-0005pW-CC for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:38 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:54327) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dY1qJ-0005oJ-6g for qemu-devel@nongnu.org; Wed, 19 Jul 2017 23:09:35 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 521BC20A41; Wed, 19 Jul 2017 23:09:32 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 19 Jul 2017 23:09:32 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A302240AF; Wed, 19 Jul 2017 23:09:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=JIq a/+T4t+RWZYCulKxJhNxL6q/Vpw+eIq7ABMSghn0=; b=VpARny90oc4HwI7zizq /ZFPuCGkSlxMzXfAgTItb4bYJrQdl5d9HpTAv2UUOMYiGXRRRtTC4qpPXXqnsBbl Eheg0kCAWofALk5gBSmpTFu/OxZRFZ812Rik6JXd9k7Su+A5prSJKaBSnUXnReKt Fwd8bUg65N8RFt3MdVsjR4dg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=JIqa/+T4t+RWZYCulKxJhNxL6q/Vpw+eIq7ABMSgh n0=; b=IqDrHEYtrXG+G03TyIPoRsenDeIlGmRmsw++jZzgrxBqXOmYvQPDg/btM +DvviqD2rPJm1WO+RirAcE0EjJcbydpmBRDl4WTGFHhyrF/7dfn8Bl2BGtI9de5P bRMsobf9hPmDT/9+LmeY9zcnayEU0/5sfwghAlmMi6wm8O3yFLJfhafd5peR3kPA t9SWB00MLOVkfcH8mTK1kbNLUodfx/J7Sjke//vW/PrW8QtzgEZzgKMWvU1EixcW XErEnFNrMnJUsNF/4t03gQyklSedMaamYGtMGMBXOqhKgSzbSoKMyOBTCTM8Ag6C gdFZfPgmpGxMEOcqdfhGfPhwFJjuw== X-ME-Sender: X-Sasl-enc: BsgdHjC/NhozkF57Wu9rjWmtegvdMYVGlUPO0wKg5tDM 1500520172 From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Wed, 19 Jul 2017 23:08:51 -0400 Message-Id: <1500520169-23367-6-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500520169-23367-1-git-send-email-cota@braap.org> References: <1500520169-23367-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v3 05/43] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Reusing the have_tb_lock name, which is also defined in translate-all.c, makes code reviewing unnecessarily harder. Avoid potential confusion by renaming the local have_tb_lock variable to something else. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index d84b01d..c4c289b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -337,7 +337,7 @@ static inline TranslationBlock *tb_find(CPUState *cpu, TranslationBlock *tb; target_ulong cs_base, pc; uint32_t flags; - bool have_tb_lock =3D false; + bool acquired_tb_lock =3D false; =20 /* we record a subset of the CPU state. It will always be the same before a given translated block @@ -356,7 +356,7 @@ static inline TranslationBlock *tb_find(CPUState *cpu, */ mmap_lock(); tb_lock(); - have_tb_lock =3D true; + acquired_tb_lock =3D true; =20 /* There's a chance that our desired tb has been translated wh= ile * taking the locks so we check again inside the lock. @@ -384,15 +384,15 @@ static inline TranslationBlock *tb_find(CPUState *cpu, #endif /* See if we can patch the calling TB. */ if (last_tb && !qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) { - if (!have_tb_lock) { + if (!acquired_tb_lock) { tb_lock(); - have_tb_lock =3D true; + acquired_tb_lock =3D true; } if (!tb->invalid) { tb_add_jump(last_tb, tb_exit, tb); } } - if (have_tb_lock) { + if (acquired_tb_lock) { tb_unlock(); } return tb; --=20 2.7.4