[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/32] co-queue: drop extra coroutine_fn marks
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 01/32] co-queue: drop extra coroutine_fn marks |
Date: |
Thu, 10 Jun 2021 13:07:31 +0300 |
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>
---
include/qemu/coroutine.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 292e61aef0..4829ff373d 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
--
2.29.2
- [PATCH v4 00/32] block/nbd: rework client connection, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 01/32] co-queue: drop extra coroutine_fn marks,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v4 02/32] block/nbd: fix channel object leak, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 06/32] block/nbd: call socket_address_parse_named_fd() in advance, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 07/32] block/nbd: ensure ->connection_thread is always valid, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 08/32] block/nbd: nbd_client_handshake(): fix leak of s->ioc, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 03/32] block/nbd: fix how state is cleared on nbd_open() failure paths, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 09/32] block/nbd: BDRVNBDState: drop unused connect_err and connect_status, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 04/32] block/nbd: connect_thread_func(): do qio_channel_set_delay(false), Vladimir Sementsov-Ogievskiy, 2021/06/10