summaryrefslogtreecommitdiff
path: root/qemu-aio.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-24 14:57:22 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-30 09:30:53 +0100
commitcd9ba1ebcf0439457f22b75b38533f6634f23c5f (patch)
treee7af1d5a5aa7816810a3f44fde0e6d025c10f282 /qemu-aio.h
parent7c0628b20e7c56b7e04abb8b5f8d7da3f7cb87e8 (diff)
downloadqemu-cd9ba1ebcf0439457f22b75b38533f6634f23c5f.tar.gz
aio: prepare for introducing GSource-based dispatch
This adds a GPollFD to each AioHandler. It will then be possible to attach these GPollFDs to a GSource, and from there to the main loop. aio_wait examines the GPollFDs and avoids calling select() if any is set (similar to what it does if bottom halves are available). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-aio.h')
-rw-r--r--qemu-aio.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/qemu-aio.h b/qemu-aio.h
index f19201e7ca..ac248962fe 100644
--- a/qemu-aio.h
+++ b/qemu-aio.h
@@ -133,6 +133,13 @@ void qemu_bh_delete(QEMUBH *bh);
* outstanding AIO operations have been completed or cancelled. */
void aio_flush(AioContext *ctx);
+/* Return whether there are any pending callbacks from the GSource
+ * attached to the AioContext.
+ *
+ * This is used internally in the implementation of the GSource.
+ */
+bool aio_pending(AioContext *ctx);
+
/* Progress in completing AIO work to occur. This can issue new pending
* aio as a result of executing I/O completion or bh callbacks.
*