summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini2014-07-09 11:53:08 +0200
committerStefan Hajnoczi2014-08-29 11:46:58 +0200
commita3462c656128e7b900ccc5d436f9e858d07de264 (patch)
treef0a5ba8f06d80bbf14fb27466af9d3126b45c4e9 /include
parentaio-win32: add aio_set_dispatching optimization (diff)
downloadqemu-a3462c656128e7b900ccc5d436f9e858d07de264.tar.gz
qemu-a3462c656128e7b900ccc5d436f9e858d07de264.tar.xz
qemu-a3462c656128e7b900ccc5d436f9e858d07de264.zip
AioContext: introduce aio_prepare
This will be used to implement socket polling on Windows. On Windows, select() and g_poll() are completely different; sockets are polled with select() before calling g_poll, and the g_poll must be nonblocking if select() says a socket is ready. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/aio.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 7ba3e9675b..ef4197b861 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -205,7 +205,14 @@ void qemu_bh_cancel(QEMUBH *bh);
void qemu_bh_delete(QEMUBH *bh);
/* Return whether there are any pending callbacks from the GSource
- * attached to the AioContext.
+ * attached to the AioContext, before g_poll is invoked.
+ *
+ * This is used internally in the implementation of the GSource.
+ */
+bool aio_prepare(AioContext *ctx);
+
+/* Return whether there are any pending callbacks from the GSource
+ * attached to the AioContext, after g_poll is invoked.
*
* This is used internally in the implementation of the GSource.
*/