[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 10/21] io: pass HANDLE to g_source_add_poll on Wi
From: |
Daniel P. Berrange |
Subject: |
[Qemu-devel] [PATCH v1 10/21] io: pass HANDLE to g_source_add_poll on Win32 |
Date: |
Wed, 9 Mar 2016 17:28:13 +0000 |
From: Paolo Bonzini <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
io/channel-watch.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/io/channel-watch.c b/io/channel-watch.c
index 931fa4d..5373605 100644
--- a/io/channel-watch.c
+++ b/io/channel-watch.c
@@ -160,7 +160,11 @@ GSource *qio_channel_create_fd_watch(QIOChannel *ioc,
ssource->condition = condition;
+#ifdef CONFIG_WIN32
+ ssource->fd.fd = (gint64)_get_osfhandle(fd);
+#else
ssource->fd.fd = fd;
+#endif
ssource->fd.events = condition;
g_source_add_poll(source, &ssource->fd);
@@ -186,10 +190,15 @@ GSource *qio_channel_create_fd_pair_watch(QIOChannel *ioc,
ssource->condition = condition;
+#ifdef CONFIG_WIN32
+ ssource->fdread.fd = (gint64)_get_osfhandle(fdread);
+ ssource->fdwrite.fd = (gint64)_get_osfhandle(fdwrite);
+#else
ssource->fdread.fd = fdread;
- ssource->fdread.events = condition & G_IO_IN;
-
ssource->fdwrite.fd = fdwrite;
+#endif
+
+ ssource->fdread.events = condition & G_IO_IN;
ssource->fdwrite.events = condition & G_IO_OUT;
g_source_add_poll(source, &ssource->fdread);
--
2.5.0
- [Qemu-devel] [PATCH v1 03/21] io: initialize sockets in test program, (continued)
- [Qemu-devel] [PATCH v1 03/21] io: initialize sockets in test program, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 01/21] osdep: fix socket_error() to work with Mingw64, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 04/21] io: bind to socket before creating QIOChannelSocket, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 05/21] io: wait for incoming client in socket test, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 06/21] io: set correct error object in background reader test thread, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 07/21] io: assert errors before asserting content in I/O test, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 08/21] io: fix copy+paste mistake in socket error message, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 09/21] io: add missing EWOULDBLOCK checks in Win32 I/O code paths, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 10/21] io: pass HANDLE to g_source_add_poll on Win32,
Daniel P. Berrange <=
- [Qemu-devel] [PATCH v1 11/21] io: introduce qio_channel_create_socket_watch, Daniel P. Berrange, 2016/03/09
- [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Daniel P. Berrange, 2016/03/09
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Paolo Bonzini, 2016/03/09
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Eric Blake, 2016/03/09
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Paolo Bonzini, 2016/03/09
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Daniel P. Berrange, 2016/03/10
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Paolo Bonzini, 2016/03/10
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Eric Blake, 2016/03/10
- Re: [Qemu-devel] [PATCH v1 12/21] io: implement socket watch for win32 using WSAEventSelect+select, Daniel P. Berrange, 2016/03/10
[Qemu-devel] [PATCH v1 14/21] char: remove qemu_chr_finish_socket_connection method, Daniel P. Berrange, 2016/03/09