aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-24 23:50:24 +0200
committerAndreas Färber <afaerber@suse.de>2013-09-03 12:25:55 +0200
commitbdc44640cb33c90809376a262df871a1144d339a (patch)
treeef3b8d1d6a389d85baeb0cee895471b634a2fc3b /target-i386
parent27013bf20d5d93ac75d398aa3608604e8ad91b5a (diff)
downloadqemu-bdc44640cb33c90809376a262df871a1144d339a.zip
qemu-bdc44640cb33c90809376a262df871a1144d339a.tar.gz
qemu-bdc44640cb33c90809376a262df871a1144d339a.tar.bz2
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 'target-i386')
-rw-r--r--target-i386/helper.c3
-rw-r--r--target-i386/misc_helper.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index bf3e2ac..7c58e27 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1231,8 +1231,7 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
params.mcg_status = MCG_STATUS_MCIP | MCG_STATUS_RIPV;
params.addr = 0;
params.misc = 0;
- for (other_cs = first_cpu; other_cs != NULL;
- other_cs = other_cs->next_cpu) {
+ CPU_FOREACH(other_cs) {
if (other_cs == cs) {
continue;
}
diff --git a/target-i386/misc_helper.c b/target-i386/misc_helper.c
index 957926c..93933fd 100644
--- a/target-i386/misc_helper.c
+++ b/target-i386/misc_helper.c
@@ -610,7 +610,7 @@ void helper_mwait(CPUX86State *env, int next_eip_addend)
cpu = x86_env_get_cpu(env);
cs = CPU(cpu);
/* XXX: not complete but not completely erroneous */
- if (cs->cpu_index != 0 || cs->next_cpu != NULL) {
+ if (cs->cpu_index != 0 || CPU_NEXT(cs) != NULL) {
/* more than one CPU: do not sleep because another CPU may
wake this one */
} else {