qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-cpu 04/59] cpus: Simplify cpu_synchronize_all_po


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-cpu 04/59] cpus: Simplify cpu_synchronize_all_post_init()
Date: Sun, 9 Jun 2013 21:12:31 +0200

Use new qemu_for_each_cpu().

Signed-off-by: Andreas Färber <address@hidden>
---
 cpus.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cpus.c b/cpus.c
index 1186ad3..85b35f6 100644
--- a/cpus.c
+++ b/cpus.c
@@ -425,13 +425,14 @@ void cpu_synchronize_all_post_reset(void)
     qemu_for_each_cpu(cpu_synchronize_one_post_reset, NULL);
 }
 
-void cpu_synchronize_all_post_init(void)
+static void cpu_synchronize_one_post_init(CPUState *cpu, void *data)
 {
-    CPUArchState *cpu;
+    cpu_synchronize_post_init(cpu);
+}
 
-    for (cpu = first_cpu; cpu; cpu = cpu->next_cpu) {
-        cpu_synchronize_post_init(ENV_GET_CPU(cpu));
-    }
+void cpu_synchronize_all_post_init(void)
+{
+    qemu_for_each_cpu(cpu_synchronize_one_post_init, NULL);
 }
 
 bool cpu_is_stopped(CPUState *cpu)
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]