From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v6 2/6] queue: Add macro for incremental traversal
Date: Mon, 26 Jun 2017 15:33:13 +0300 [thread overview]
Message-ID: <877ezzapyu.fsf@frigg.lan> (raw)
In-Reply-To: <ca41d7c2-b009-46b9-1f76-3e45c0f91ecf@twiddle.net> (Richard Henderson's message of "Mon, 19 Jun 2017 16:20:55 -0700")
Richard Henderson writes:
> On 06/12/2017 07:54 AM, Lluís Vilanova wrote:
>> Adds macro QTAILQ_FOREACH_CONTINUE to support incremental list
>> traversal.
>>
>> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
>> ---
>> include/qemu/queue.h | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/include/qemu/queue.h b/include/qemu/queue.h
>> index 35292c3155..eb2bf9cb1c 100644
>> --- a/include/qemu/queue.h
>> +++ b/include/qemu/queue.h
>> @@ -415,6 +415,18 @@ struct { \
>> (var); \
>> (var) = ((var)->field.tqe_next))
>> +/**
>> + * QTAILQ_FOREACH_CONTINUE:
>> + * @var: Variable to resume iteration from.
>> + * @field: Field in @var holding a QTAILQ_ENTRY for this queue.
>> + *
>> + * Resumes iteration on a queue from the element in @var.
>> + */
>> +#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); \
>>
>>
> I still say this isn't required if the breakpoint loop is better structured.
I can embed the use of QTAILQ into translate-block.c, but I wanted to keep the
implementation of breakpoint lists hidden behind the cpu_breakpoint API.
Thanks,
Lluis
next prev parent reply other threads:[~2017-06-26 12:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 14:53 [Qemu-devel] [RFC PATCH v6 0/6] translate: [tcg] Generic translation framework Lluís Vilanova
2017-06-12 14:53 ` [PATCH v6 1/6] Pass generic CPUState to gen_intermediate_code() Lluís Vilanova
2017-06-12 14:53 ` [Qemu-devel] " Lluís Vilanova
2017-06-13 1:40 ` David Gibson
2017-06-13 1:40 ` [Qemu-devel] " David Gibson
2017-06-14 21:35 ` Eduardo Habkost
2017-06-14 21:35 ` [Qemu-devel] " Eduardo Habkost
2017-06-14 22:30 ` Laurent Vivier
2017-06-16 14:07 ` Alex Bennée
2017-06-16 14:07 ` [Qemu-devel] " Alex Bennée
2017-06-12 14:54 ` [Qemu-devel] [PATCH v6 2/6] queue: Add macro for incremental traversal Lluís Vilanova
2017-06-19 23:20 ` Richard Henderson
2017-06-26 12:33 ` Lluís Vilanova [this message]
2017-06-27 1:10 ` Richard Henderson
2017-06-27 9:13 ` Lluís Vilanova
2017-06-12 14:54 ` [Qemu-devel] [PATCH v6 3/6] target: [tcg] Add generic translation framework Lluís Vilanova
2017-06-15 22:05 ` [Qemu-devel] [PATCH] translator mega-patch Emilio G. Cota
2017-06-18 14:37 ` Lluís Vilanova
2017-06-18 18:26 ` Peter Maydell
2017-06-19 4:08 ` Emilio G. Cota
2017-06-19 7:15 ` Peter Maydell
2017-06-15 22:19 ` [Qemu-devel] [PATCH v6 3/6] target: [tcg] Add generic translation framework Emilio G. Cota
2017-06-15 23:25 ` Emilio G. Cota
2017-06-17 1:09 ` Emilio G. Cota
2017-06-18 14:24 ` Lluís Vilanova
2017-06-18 14:22 ` Lluís Vilanova
2017-06-18 15:47 ` Lluís Vilanova
2017-06-18 21:54 ` Lluís Vilanova
2017-06-19 4:10 ` Emilio G. Cota
2017-06-19 8:37 ` Lluís Vilanova
2017-06-18 14:20 ` Lluís Vilanova
2017-06-12 14:54 ` [PATCH v6 4/6] target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*) Lluís Vilanova
2017-06-12 14:54 ` [Qemu-devel] " Lluís Vilanova
2017-06-12 14:54 ` [PATCH v6 6/6] target: [tcg, arm] Port to generic translation framework Lluís Vilanova
2017-06-12 14:54 ` [Qemu-devel] " Lluís Vilanova
2017-06-16 0:18 ` Emilio G. Cota
2017-06-18 14:41 ` Lluís Vilanova
2017-06-19 4:22 ` Emilio G. Cota
2017-06-15 18:02 ` [Qemu-devel] [RFC PATCH v6 0/6] translate: [tcg] Generic " Emilio G. Cota
2017-06-18 14:41 ` Lluís Vilanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ezzapyu.fsf@frigg.lan \
--to=vilanova@ac.upc.edu \
--cc=alex.bennee@linaro.org \
--cc=crosthwaite.peter@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.