aio: add non-blocking variant of aio_wait

This will be used when polling the GSource attached to an AioContext.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-09-24 14:37:53 +02:00
parent 4231c88d27
commit 7c0628b20e
4 changed files with 32 additions and 13 deletions

View file

@ -144,5 +144,5 @@ AioContext *aio_context_new(void)
void aio_flush(AioContext *ctx)
{
while (aio_wait(ctx));
while (aio_poll(ctx, true));
}