aboutsummaryrefslogtreecommitdiff
path: root/qemu-coroutine.h
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-coroutine.h')
-rw-r--r--qemu-coroutine.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/qemu-coroutine.h b/qemu-coroutine.h
index b8fc4f4332..8a55fe125e 100644
--- a/qemu-coroutine.h
+++ b/qemu-coroutine.h
@@ -118,6 +118,12 @@ void qemu_co_queue_init(CoQueue *queue);
void coroutine_fn qemu_co_queue_wait(CoQueue *queue);
/**
+ * Adds the current coroutine to the head of the CoQueue and transfers control to the
+ * caller of the coroutine.
+ */
+void coroutine_fn qemu_co_queue_wait_insert_head(CoQueue *queue);
+
+/**
* Restarts the next coroutine in the CoQueue and removes it from the queue.
*
* Returns true if a coroutine was restarted, false if the queue is empty.
@@ -125,6 +131,11 @@ void coroutine_fn qemu_co_queue_wait(CoQueue *queue);
bool qemu_co_queue_next(CoQueue *queue);
/**
+ * Restarts all coroutines in the CoQueue and leaves the queue empty.
+ */
+void qemu_co_queue_restart_all(CoQueue *queue);
+
+/**
* Checks if the CoQueue is empty.
*/
bool qemu_co_queue_empty(CoQueue *queue);