[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 07/45] cpu-exec: rename have_tb_lock to acquired_
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v2 07/45] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find |
Date: |
Sun, 16 Jul 2017 16:03:50 -0400 |
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.
Signed-off-by: Emilio G. Cota <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 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 = 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
@@ -356,7 +356,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.
@@ -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 = 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.7.4
- [Qemu-devel] [PATCH v2 00/45] tcg: support for multiple TCG contexts, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 01/45] vl: fix breakage of -tb-size, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 02/45] translate-all: remove redundant !tcg_enabled check in dump_exec_info, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 08/45] tcg/i386: constify tcg_target_callee_save_regs, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 03/45] cputlb: bring back tlb_flush_count under !TLB_DEBUG, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 04/45] tcg: fix corruption of code_time profiling counter upon tb_flush, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 06/45] translate-all: make have_tb_lock static, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 07/45] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v2 20/45] target/sparc: check CF_PARALLEL instead of parallel_cpus, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 11/45] exec-all: bring tb->invalid into tb->cflags, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 09/45] tcg/mips: constify tcg_target_callee_save_regs, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 23/45] translate-all: define and use DEBUG_TB_FLUSH_GATE, Emilio G. Cota, 2017/07/16
- [Qemu-devel] [PATCH v2 22/45] cpu-exec: lookup/generate TB outside exclusive region during step_atomic, Emilio G. Cota, 2017/07/16