qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-cpu v2 24/29] cpu: Drop qemu_for_each_cpu()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 24/29] cpu: Drop qemu_for_each_cpu()
Date: Sun, 16 Jun 2013 22:41:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

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 <address@hidden>
>> Signed-off-by: Andreas Färber <address@hidden>
> 
> 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



reply via email to

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