From nobody Wed Feb 11 04:36:34 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; dkim=fail; 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 150766429222369.26925765761371; Tue, 10 Oct 2017 12:38:12 -0700 (PDT) Received: from localhost ([::1]:36826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e20Lm-0006Dj-45 for importer@patchew.org; Tue, 10 Oct 2017 15:37:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e20EJ-0000X8-1s for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e20EH-0004za-UA for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:14 -0400 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:45679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e20EH-0004y9-Oc for qemu-devel@nongnu.org; Tue, 10 Oct 2017 15:30:13 -0400 Received: by mail-pf0-x233.google.com with SMTP id d28so3568998pfe.2 for ; Tue, 10 Oct 2017 12:30:13 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-104-76.tukw.qwest.net. [97.126.104.76]) by smtp.gmail.com with ESMTPSA id r22sm19859788pfl.15.2017.10.10.12.30.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Oct 2017 12:30:11 -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; bh=Jmmg93vGlfXYGCWPpMGtBaYKMC23pLLXYbM9fkFhyDY=; b=Q17l8FHg6TMDqhzXUYHqL2gWewq96NZccc9avk5xLllHMIoPMFQN5xBClPT8e8IHgN uo/y3pBG6KjMCsMujB93QGR0wH1ir+Q6kT9FStVgScNnCnSVvllYr89S7KbJfA1FYeAc ptCBw13KT7y8SFB77yX4gCRkKGexggSYhIZJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jmmg93vGlfXYGCWPpMGtBaYKMC23pLLXYbM9fkFhyDY=; b=kZp4PaNhCMNDqJK0YdpCuHTm4SgVEo11+FbuN6jff/04KkG+AA1zCQysrjaNu4Gk5A VOp0YTut4i0deNuHKyP4maDu5z2r8loUVrXjFHtqnpDpLxhs7AjNTQGMj66akm8KOBkm PA/3YEPGcZv9nw5FQqyirHXgMyoK/vYgKk2XfsbQuyzOgxAQRroTVno3KxS/mhNsAbJl a3nqisAZkoUJNjRJyvmByaDwnfNAdn6owYC/CBAuWHE8TGrb5A0I9qn336JqA5PEQpaV I/sMiEbw2ig8QuELJBrx1aVm5/vOZieMJum3T0aLJYeCArEjenlz7Eiv33PLEPmiKdyV FL7A== X-Gm-Message-State: AMCzsaXJBC33CsmIga3x6bXuGMQtO+r+PeiV537zyRRQ0VCecLJwwIkt RTJxvqmrGQVgA5Szbn4/XqwyJOWt+dA= X-Google-Smtp-Source: AOwi7QBKZapCaejHVimodMtc+4FE4eatiZ+a42KvopaOLkzZZHC63mVHbVKsV8BdeR/sxSkFvTyvhA== X-Received: by 10.101.65.129 with SMTP id a1mr13373388pgq.203.1507663812550; Tue, 10 Oct 2017 12:30:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 10 Oct 2017 12:29:48 -0700 Message-Id: <20171010193003.28857-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171010193003.28857-1-richard.henderson@linaro.org> References: <20171010193003.28857-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::233 Subject: [Qemu-devel] [PULL v2 05/20] 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: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Emilio G. Cota" 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 Signed-off-by: Richard Henderson --- 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 ff6866624a..32104b8d8c 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -372,7 +372,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 @@ -391,7 +391,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. @@ -419,15 +419,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.13.6