[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH experiment 02/16] coroutine: qemu_coroutine_get_aio_context is no
From: |
Paolo Bonzini |
Subject: |
[PATCH experiment 02/16] coroutine: qemu_coroutine_get_aio_context is not a coroutine_fn |
Date: |
Mon, 14 Mar 2022 10:31:49 +0100 |
Since it operates on a given coroutine, qemu_coroutine_get_aio_context
can be called from outside coroutine context.
This is for example how qio_channel_restart_read uses it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/qemu/coroutine.h | 2 +-
util/qemu-coroutine.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index da68be5ad2..666f3ba0e0 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -92,7 +92,7 @@ void coroutine_fn qemu_coroutine_yield(void);
/**
* Get the AioContext of the given coroutine
*/
-AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co);
+AioContext *qemu_coroutine_get_aio_context(Coroutine *co);
/**
* Get the currently executing coroutine
diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c
index c03b2422ff..9f2bd96fa0 100644
--- a/util/qemu-coroutine.c
+++ b/util/qemu-coroutine.c
@@ -200,7 +200,7 @@ bool qemu_coroutine_entered(Coroutine *co)
return co->caller;
}
-AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co)
+AioContext *qemu_coroutine_get_aio_context(Coroutine *co)
{
return co->ctx;
}
--
2.35.1
- [PATCH experiment 00/16] C++20 coroutine backend, Paolo Bonzini, 2022/03/14
- [PATCH experiment 01/16] coroutine: add missing coroutine_fn annotations for CoRwlock functions, Paolo Bonzini, 2022/03/14
- [PATCH experiment 02/16] coroutine: qemu_coroutine_get_aio_context is not a coroutine_fn,
Paolo Bonzini <=
- [PATCH experiment 03/16] coroutine: small code cleanup in qemu_co_rwlock_wrlock, Paolo Bonzini, 2022/03/14
- [PATCH experiment 05/16] port atomic.h to C++, Paolo Bonzini, 2022/03/14
- [PATCH experiment 07/16] start porting compiler.h to C++, Paolo Bonzini, 2022/03/14
- [PATCH experiment 13/16] disable some code, Paolo Bonzini, 2022/03/14
- [PATCH experiment 12/16] remove "new" keyword from trace-events, Paolo Bonzini, 2022/03/14
- [PATCH experiment 16/16] port test-coroutine to C++ coroutines, Paolo Bonzini, 2022/03/14
- [PATCH experiment 14/16] util: introduce C++ stackless coroutine backend, Paolo Bonzini, 2022/03/14