summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFam Zheng2017-04-10 14:07:35 +0200
committerFam Zheng2017-04-11 14:07:15 +0200
commit8865852e00557925f60eb6e26d797833422ee86d (patch)
tree3f4da272ed71d60b9b248716a7c9b328e2237c38 /include
parentcoroutine: Extract qemu_aio_coroutine_enter (diff)
downloadqemu-8865852e00557925f60eb6e26d797833422ee86d.tar.gz
qemu-8865852e00557925f60eb6e26d797833422ee86d.tar.xz
qemu-8865852e00557925f60eb6e26d797833422ee86d.zip
async: Introduce aio_co_enter
They start the coroutine on the specified context. Signed-off-by: Fam Zheng <famz@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/aio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 677b6ffc25..406e32305a 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -511,6 +511,15 @@ void aio_co_schedule(AioContext *ctx, struct Coroutine *co);
void aio_co_wake(struct Coroutine *co);
/**
+ * aio_co_enter:
+ * @ctx: the context to run the coroutine
+ * @co: the coroutine to run
+ *
+ * Enter a coroutine in the specified AioContext.
+ */
+void aio_co_enter(AioContext *ctx, struct Coroutine *co);
+
+/**
* Return the AioContext whose event loop runs in the current thread.
*
* If called from an IOThread this will be the IOThread's AioContext. If