From 8865852e00557925f60eb6e26d797833422ee86d Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Mon, 10 Apr 2017 20:07:35 +0800 Subject: async: Introduce aio_co_enter They start the coroutine on the specified context. Signed-off-by: Fam Zheng Acked-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf --- include/block/aio.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/block/aio.h b/include/block/aio.h index 677b6ff..406e323 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 -- cgit v1.1