[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 05/20] cpu-exec: rename have_tb_lock to acquired_t
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL v2 05/20] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find |
Date: |
Tue, 10 Oct 2017 12:29:48 -0700 |
From: "Emilio G. Cota" <address@hidden>
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 <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
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 = false;
+ bool acquired_tb_lock = false;
/* 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 = true;
+ acquired_tb_lock = true;
/* There's a chance that our desired tb has been translated while
* 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 = true;
+ acquired_tb_lock = true;
}
if (!tb->invalid) {
tb_add_jump(last_tb, tb_exit, tb);
}
}
- if (have_tb_lock) {
+ if (acquired_tb_lock) {
tb_unlock();
}
return tb;
--
2.13.6
- [Qemu-devel] [PULL v2 00/20] Queued TCG patches, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 02/20] tcg: fix corruption of code_time profiling counter upon tb_flush, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 03/20] exec-all: fix typos in TranslationBlock's documentation, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 05/20] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find,
Richard Henderson <=
- [Qemu-devel] [PULL v2 01/20] cputlb: bring back tlb_flush_count under !TLB_DEBUG, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 04/20] translate-all: make have_tb_lock static, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 06/20] tcg/i386: constify tcg_target_callee_save_regs, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 07/20] tcg/mips: constify tcg_target_callee_save_regs, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 13/20] translate-all: define and use DEBUG_TB_INVALIDATE_GATE, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 10/20] exec-all: bring tb->invalid into tb->cflags, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 09/20] tcg: consolidate TB lookups in tb_lookup__cpu_state, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 11/20] translate-all: define and use DEBUG_TB_FLUSH_GATE, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 08/20] tcg: remove addr argument from lookup_tb_ptr, Richard Henderson, 2017/10/10
- [Qemu-devel] [PULL v2 14/20] translate-all: define and use DEBUG_TB_CHECK_GATE, Richard Henderson, 2017/10/10