aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-06-10 13:07:31 +0300
committerEric Blake <eblake@redhat.com>2021-06-18 10:59:52 -0500
commit0e70260b65814fe7c016a63c3081ac39617294a0 (patch)
treee4dff1bfcb96893a7a8ed7c66b64d84fa2834234 /include
parent55159c34b8788ae00984341356d3ea4774912665 (diff)
downloadqemu-0e70260b65814fe7c016a63c3081ac39617294a0.zip
qemu-0e70260b65814fe7c016a63c3081ac39617294a0.tar.gz
qemu-0e70260b65814fe7c016a63c3081ac39617294a0.tar.bz2
co-queue: drop extra coroutine_fn marks
qemu_co_queue_next() and qemu_co_queue_restart_all() just call aio_co_wake() which works well in non-coroutine context. So these functions can be called from non-coroutine context as well. And actually qemu_co_queue_restart_all() is called from nbd_cancel_in_flight(), which is called from non-coroutine context. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210610100802.5888-2-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/coroutine.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 292e61a..4829ff3 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -210,13 +210,15 @@ void coroutine_fn qemu_co_queue_wait_impl(CoQueue *queue, QemuLockable *lock);
/**
* Removes the next coroutine from the CoQueue, and wake it up.
* Returns true if a coroutine was removed, false if the queue is empty.
+ * OK to run from coroutine and non-coroutine context.
*/
-bool coroutine_fn qemu_co_queue_next(CoQueue *queue);
+bool qemu_co_queue_next(CoQueue *queue);
/**
* Empties the CoQueue; all coroutines are woken up.
+ * OK to run from coroutine and non-coroutine context.
*/
-void coroutine_fn qemu_co_queue_restart_all(CoQueue *queue);
+void qemu_co_queue_restart_all(CoQueue *queue);
/**
* Removes the next coroutine from the CoQueue, and wake it up. Unlike