Skip to content
Snippets Groups Projects
Commit 0e70260b authored by Vladimir Sementsov-Ogievskiy's avatar Vladimir Sementsov-Ogievskiy Committed by Eric Blake
Browse files

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: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210610100802.5888-2-vsementsov@virtuozzo.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarEric Blake <eblake@redhat.com>
parent 55159c34
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment