summaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-13 12:28:51 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-30 09:30:53 +0100
commita915f4bc977c4f3aab08a78023c1303664d1c606 (patch)
tree058173beb1ee33e79f5f83d5000532d1e4b9d0c3 /async.c
parentf627aab1ccea119fd94ca9e9df120cea6aab0c67 (diff)
downloadqemu-a915f4bc977c4f3aab08a78023c1303664d1c606.tar.gz
qemu-a915f4bc977c4f3aab08a78023c1303664d1c606.tar.bz2
qemu-a915f4bc977c4f3aab08a78023c1303664d1c606.zip
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>
Diffstat (limited to 'async.c')
-rw-r--r--async.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/async.c b/async.c
index 189ee1beb5..c99db79ac7 100644
--- a/async.c
+++ b/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));
+}