From bdc44640cb33c90809376a262df871a1144d339a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 24 Jun 2013 23:50:24 +0200 Subject: cpu: Use QTAILQ for CPU list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand macros. Signed-off-by: Andreas Färber --- translate-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'translate-all.c') diff --git a/translate-all.c b/translate-all.c index 3b5fc7c901..2c923c644b 100644 --- a/translate-all.c +++ b/translate-all.c @@ -696,7 +696,7 @@ void tb_flush(CPUArchState *env1) } tcg_ctx.tb_ctx.nb_tbs = 0; - for (cpu = first_cpu; cpu != NULL; cpu = cpu->next_cpu) { + CPU_FOREACH(cpu) { CPUArchState *env = cpu->env_ptr; memset(env->tb_jmp_cache, 0, TB_JMP_CACHE_SIZE * sizeof(void *)); @@ -850,7 +850,7 @@ void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr) /* remove the TB from the hash list */ h = tb_jmp_cache_hash_func(tb->pc); - for (cpu = first_cpu; cpu != NULL; cpu = cpu->next_cpu) { + CPU_FOREACH(cpu) { CPUArchState *env = cpu->env_ptr; if (env->tb_jmp_cache[h] == tb) { -- cgit v1.2.1