mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
ba9e75ceef
commit
8865852e00
2 changed files with 15 additions and 1 deletions
|
@ -510,6 +510,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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue