[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/8] io: add missing coroutine annotation
- To: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Philippe Mathieu-Daudé <philmd@xxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jul 2026 16:28:27 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=qcppdkim1 header.d=qualcomm.com header.i="@qualcomm.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=google header.d=oss.qualcomm.com header.i="@oss.qualcomm.com" header.h="Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To:Content-Language:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Markus Armbruster <armbru@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>, Fabiano Rosas <farosas@xxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, John Snow <jsnow@xxxxxxxxxx>, Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx>, Kevin Wolf <kwolf@xxxxxxxxxx>, Hanna Reitz <hreitz@xxxxxxxxxx>, qemu-block@xxxxxxxxxx, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Fam Zheng <fam@xxxxxxxxxx>, "Denis V. Lunev" <den@xxxxxxxxxx>, Christian Schoenebeck <qemu_oss@xxxxxxxxxxxxx>, Greg Kurz <groug@xxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Li Zhijian <lizhijian@xxxxxxxxxxx>
- Delivery-date: Mon, 20 Jul 2026 14:28:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20/7/26 09:55, Marc-André Lureau wrote:
Fixes: 1edf0df28409 ("io: Add qio_channel_wait_cond() helper")
Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
include/io/channel.h | 4 ++--
io/channel.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/io/channel.h b/include/io/channel.h
index 98485c9280a..c90ace20d53 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -1016,8 +1016,8 @@ void qio_channel_wait(QIOChannel *ioc,
* This will work with/without a coroutine context, by automatically select
* the proper API to wait.
*/
-void qio_channel_wait_cond(QIOChannel *ioc,
- GIOCondition condition);
+void coroutine_mixed_fn qio_channel_wait_cond(QIOChannel *ioc,
Better using same alignment than below (more importantly in
a header), otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxxxxxxxx>
+ GIOCondition condition);
/**
* qio_channel_set_aio_fd_handler:
diff --git a/io/channel.c b/io/channel.c
index 2853dadb684..620256f310d 100644
--- a/io/channel.c
+++ b/io/channel.c
@@ -905,8 +905,9 @@ void qio_channel_wait(QIOChannel *ioc,
g_main_context_unref(ctxt);
}
-void qio_channel_wait_cond(QIOChannel *ioc,
- GIOCondition condition)
+void coroutine_mixed_fn
+qio_channel_wait_cond(QIOChannel *ioc,
+ GIOCondition condition)
{
if (qemu_in_coroutine()) {
qio_channel_yield(ioc, condition);
|