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>
This commit is contained in:
Andreas Färber 2013-06-24 23:50:24 +02:00
parent 27013bf20d
commit bdc44640cb
26 changed files with 94 additions and 112 deletions

View file

@ -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;
}