]> Git Repo - qemu.git/commitdiff
cpus: Add a macro to walk CPUs in reverse
authorBharata B Rao <[email protected]>
Thu, 2 Jul 2015 06:23:16 +0000 (16:23 +1000)
committerAlexander Graf <[email protected]>
Tue, 7 Jul 2015 15:44:52 +0000 (17:44 +0200)
Add CPU_FOREACH_REVERSE that walks CPUs in reverse.

Needed for PowerPC CPU device tree reorganization.

Signed-off-by: Bharata B Rao <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
include/qom/cpu.h

index 39f0f19fb00138b9984a65999f51d08119a5aed9..42f42f5a2dd6298a3077bea45436f405a2adf781 100644 (file)
@@ -323,6 +323,8 @@ extern struct CPUTailQ cpus;
 #define CPU_FOREACH(cpu) QTAILQ_FOREACH(cpu, &cpus, node)
 #define CPU_FOREACH_SAFE(cpu, next_cpu) \
     QTAILQ_FOREACH_SAFE(cpu, &cpus, node, next_cpu)
+#define CPU_FOREACH_REVERSE(cpu) \
+    QTAILQ_FOREACH_REVERSE(cpu, &cpus, CPUTailQ, node)
 #define first_cpu QTAILQ_FIRST(&cpus)
 
 DECLARE_TLS(CPUState *, current_cpu);
This page took 0.022004 seconds and 4 git commands to generate.