From 38fcbd3f08375eb2986b9b63ccd4f593e71aa99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 7 Jul 2013 19:50:23 +0200 Subject: cpu: Replace qemu_for_each_cpu() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was introduced to loop over CPUs from target-independent code, but since commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independent CPUState is used. A loop can be considered more efficient than function calls in a loop, and CPU_FOREACH() hides implementation details just as well, so use that instead. Suggested-by: Markus Armbruster Acked-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- exec.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'exec.c') diff --git a/exec.c b/exec.c index ca2a504f16..87b0b39b90 100644 --- a/exec.c +++ b/exec.c @@ -362,15 +362,6 @@ CPUState *qemu_get_cpu(int index) return NULL; } -void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data) -{ - CPUState *cpu; - - CPU_FOREACH(cpu) { - func(cpu, data); - } -} - void cpu_exec_init(CPUArchState *env) { CPUState *cpu = ENV_GET_CPU(env); -- cgit v1.2.3