]> git.proxmox.com Git - mirror_qemu.git/blobdiff - util/qemu-coroutine-lock.c
coroutine-lock: introduce qemu_co_queue_enter_all
[mirror_qemu.git] / util / qemu-coroutine-lock.c
index 5705cfea2e1853e3a3ca0e65c875cb545a1ca49c..5b0342faedbb86ec0d3d39801a760f4acef87ff5 100644 (file)
@@ -108,6 +108,13 @@ bool coroutine_fn qemu_co_queue_next(CoQueue *queue)
     return qemu_co_enter_next_impl(queue, NULL);
 }
 
+void qemu_co_enter_all_impl(CoQueue *queue, QemuLockable *lock)
+{
+    while (qemu_co_enter_next_impl(queue, lock)) {
+        /* just loop */
+    }
+}
+
 bool qemu_co_queue_empty(CoQueue *queue)
 {
     return QSIMPLEQ_FIRST(&queue->entries) == NULL;