[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/6] queue: Add macro for incremental traversal
From: |
Lluís Vilanova |
Subject: |
[Qemu-devel] [PATCH v2 2/6] queue: Add macro for incremental traversal |
Date: |
Fri, 9 Sep 2016 15:03:17 +0200 |
User-agent: |
StGit/0.17.1-dirty |
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 c2b6c81..4d57166 100644
--- a/include/qemu/queue.h
+++ b/include/qemu/queue.h
@@ -414,6 +414,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); \
- [Qemu-devel] [RFC PATCH v2 0/6] translate: [tcg] Generic translation framework, Lluís Vilanova, 2016/09/09
- [Qemu-devel] [PATCH v2 2/6] queue: Add macro for incremental traversal,
Lluís Vilanova <=
- [Qemu-devel] [PATCH v2 3/6] target: [tcg] Add generic translation framework, Lluís Vilanova, 2016/09/09
- [Qemu-devel] [PATCH v2 4/6] target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*), Lluís Vilanova, 2016/09/09
- [Qemu-devel] [PATCH v2 5/6] target: [tcg, i386] Port to generic translation framework, Lluís Vilanova, 2016/09/09
- [Qemu-devel] [PATCH v2 6/6] target: [tcg, arm] Port to generic translation framework, Lluís Vilanova, 2016/09/09
- [Qemu-devel] [PATCH v2 1/6] Pass generic CPUState to gen_intermediate_code(), Lluís Vilanova, 2016/09/09
- Re: [Qemu-devel] [RFC PATCH v2 0/6] translate: [tcg] Generic translation framework, no-reply, 2016/09/11
- Re: [Qemu-devel] [RFC PATCH v2 0/6] translate: [tcg] Generic translation framework, no-reply, 2016/09/12
- Re: [Qemu-devel] [RFC PATCH v2 0/6] translate: [tcg] Generic translation framework, Lluís Vilanova, 2016/09/13