summaryrefslogtreecommitdiffstats
path: root/include/qemu/queue.h
diff options
context:
space:
mode:
authorPeter Maydell2018-03-27 18:11:33 +0200
committerPeter Maydell2018-03-27 18:11:33 +0200
commit6cf38cbf2961c57bd85022cf9adf7ef85dae0f02 (patch)
tree834a4d30e1dc544b425d52dd429f2191b99539c9 /include/qemu/queue.h
parentMerge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging (diff)
parentMAINTAINERS: add include/block/aio-wait.h (diff)
downloadqemu-6cf38cbf2961c57bd85022cf9adf7ef85dae0f02.tar.gz
qemu-6cf38cbf2961c57bd85022cf9adf7ef85dae0f02.tar.xz
qemu-6cf38cbf2961c57bd85022cf9adf7ef85dae0f02.zip
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Tue 27 Mar 2018 15:41:11 BST # gpg: using RSA key 9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: MAINTAINERS: add include/block/aio-wait.h coroutine: add test-aio coroutine queue chaining test case coroutine: avoid co_queue_wakeup recursion queue: add QSIMPLEQ_PREPEND() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu/queue.h')
-rw-r--r--include/qemu/queue.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/qemu/queue.h b/include/qemu/queue.h
index aa270d2b38..59fd1203a1 100644
--- a/include/qemu/queue.h
+++ b/include/qemu/queue.h
@@ -324,6 +324,14 @@ struct { \
} \
} while (/*CONSTCOND*/0)
+#define QSIMPLEQ_PREPEND(head1, head2) do { \
+ if (!QSIMPLEQ_EMPTY((head2))) { \
+ *(head2)->sqh_last = (head1)->sqh_first; \
+ (head1)->sqh_first = (head2)->sqh_first; \
+ QSIMPLEQ_INIT((head2)); \
+ } \
+} while (/*CONSTCOND*/0)
+
#define QSIMPLEQ_LAST(head, type, field) \
(QSIMPLEQ_EMPTY((head)) ? \
NULL : \