mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
aio: add I/O handlers to the AioContext interface
With this patch, I/O handlers (including event notifier handlers) can be attached to a single AioContext. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f627aab1cc
commit
a915f4bc97
4 changed files with 101 additions and 48 deletions
6
async.c
6
async.c
|
|
@ -136,7 +136,13 @@ void aio_bh_update_timeout(AioContext *ctx, uint32_t *timeout)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
AioContext *aio_context_new(void)
|
||||
{
|
||||
return g_new0(AioContext, 1);
|
||||
}
|
||||
|
||||
void aio_flush(AioContext *ctx)
|
||||
{
|
||||
while (aio_wait(ctx));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue