aboutsummaryrefslogtreecommitdiff
path: root/io/channel-watch.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-02-13 14:52:22 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2017-02-21 11:14:07 +0000
commitbf88c1247f80ac6d62710d5d0d0d9ce3a53e99ec (patch)
tree2b2e9e2f7f0f525cb22fc8aaea204ff6307a65d1 /io/channel-watch.c
parent934ebf48c0e81dd1f3febb53ae9b8eb8f2a12aab (diff)
io: add methods to set I/O handlers on AioContext
This is in preparation for making qio_channel_yield work on AioContexts other than the main one. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 20170213135235.12274-6-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'io/channel-watch.c')
-rw-r--r--io/channel-watch.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io/channel-watch.c b/io/channel-watch.c
index cf1cdff896..8640d1c464 100644
--- a/io/channel-watch.c
+++ b/io/channel-watch.c
@@ -285,6 +285,12 @@ GSource *qio_channel_create_socket_watch(QIOChannel *ioc,
GSource *source;
QIOChannelSocketSource *ssource;
+#ifdef WIN32
+ WSAEventSelect(socket, ioc->event,
+ FD_READ | FD_ACCEPT | FD_CLOSE |
+ FD_CONNECT | FD_WRITE | FD_OOB);
+#endif
+
source = g_source_new(&qio_channel_socket_source_funcs,
sizeof(QIOChannelSocketSource));
ssource = (QIOChannelSocketSource *)source;