diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-24 23:50:24 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-09-03 12:25:55 +0200 |
commit | bdc44640cb33c90809376a262df871a1144d339a (patch) | |
tree | ef3b8d1d6a389d85baeb0cee895471b634a2fc3b /translate-all.c | |
parent | 27013bf20d5d93ac75d398aa3608604e8ad91b5a (diff) |
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand
macros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'translate-all.c')
-rw-r--r-- | translate-all.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |