summaryrefslogtreecommitdiffstats
path: root/include/qemu/queue.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin2018-01-11 21:01:17 +0100
committerMichael S. Tsirkin2018-01-11 21:03:50 +0100
commitacc95bc85036c443da8bf7159a77edf9f00dcd80 (patch)
tree21965c6e60a2e29664b7685e52feacdb6a86e0bd /include/qemu/queue.h
parentsmbus: do not immediately complete commands (diff)
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180111'... (diff)
downloadqemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.gz
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.tar.xz
qemu-acc95bc85036c443da8bf7159a77edf9f00dcd80.zip
Merge remote-tracking branch 'origin/master' into HEAD
Resolve conflicts around apb. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/qemu/queue.h')
-rw-r--r--include/qemu/queue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qemu/queue.h b/include/qemu/queue.h
index 35292c3155..aa270d2b38 100644
--- a/include/qemu/queue.h
+++ b/include/qemu/queue.h
@@ -425,6 +425,11 @@ struct { \
(var); \
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+#define QTAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev_var) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var) && ((prev_var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)), 1); \
+ (var) = (prev_var))
+
/*
* Tail queue access methods.
*/