[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/6] queue: Add macro for incremental travers
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/6] queue: Add macro for incremental traversal |
Date: |
Tue, 27 Dec 2016 20:07:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Peter Maydell writes:
> On 27 December 2016 at 15:37, Lluís Vilanova <address@hidden> wrote:
>> Adds macro QTAILQ_FOREACH_CONTINUE to support incremental list
>> traversal.
>>
>> Signed-off-by: Lluís Vilanova <address@hidden>
>> ---
>> include/qemu/queue.h | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/include/qemu/queue.h b/include/qemu/queue.h
>> index 342073fb4d..0d709016f4 100644
>> --- a/include/qemu/queue.h
>> +++ b/include/qemu/queue.h
>> @@ -415,6 +415,11 @@ struct {
>> \
>> (var); \
>> (var) = ((var)->field.tqe_next))
>>
>> +#define QTAILQ_FOREACH_CONTINUE(var, field) \
>> + for ((var) = ((var)->field.tqe_next); \
>> + (var); \
>> + (var) = ((var)->field.tqe_next))
>> +
>> #define QTAILQ_FOREACH_SAFE(var, head, field, next_var) \
>> for ((var) = ((head)->tqh_first); \
>> (var) && ((next_var) = ((var)->field.tqe_next), 1); \
> Could we have some documentation for the new macro, please?
Sure thing.
Lluis
- [Qemu-devel] [RFC PATCH v3 0/6] translate: [tcg] Generic translation framework, Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 2/6] queue: Add macro for incremental traversal, Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 3/6] target: [tcg] Add generic translation framework, Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 4/6] target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*), Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 5/6] target: [tcg, i386] Port to generic translation framework, Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 6/6] target: [tcg, arm] Port to generic translation framework, Lluís Vilanova, 2016/12/27
- [Qemu-devel] [PATCH v3 1/6] Pass generic CPUState to gen_intermediate_code(), Lluís Vilanova, 2016/12/27
- Re: [Qemu-devel] [RFC PATCH v3 0/6] translate: [tcg] Generic translation framework, no-reply, 2016/12/27
- Re: [Qemu-devel] [RFC PATCH v3 0/6] translate: [tcg] Generic translation framework, no-reply, 2016/12/27