Am 16.06.2013 22:26, schrieb Michael S. Tsirkin: > On Sun, Jun 16, 2013 at 05:57:44PM +0200, Andreas Färber wrote: >> Revert commit d6b9e0d60cc511eca210834428bb74508cff3d33 (cpu: Add >> qemu_for_each_cpu()) and its usage in favor of open-coding CPU loops, >> now that they are based on CPUState. >> >> Suggested-by: Markus Armbruster <arm...@redhat.com> >> Signed-off-by: Andreas Färber <afaer...@suse.de> > > Open-coding is kind of nasty though. > > How about > #define qemu_for_each_cpu(cpu) \ > for (cpu = first_cpu; cpu != NULL; cpu = cpu->next_cpu)
I've been investigating QTAILQ_FOREACH(), but I'd rather do things in two steps - CPUState type (21/29) in this series and then further macro wizardry. I'd be fine to defer this patch and replace it with the final helper of our choice. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg