diff options
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/queue.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qemu/queue.h b/include/qemu/queue.h index 35292c3..aa270d2 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. */ |