On 12/23/2016 12:26 PM, Paolo Bonzini wrote: > This is in preparation for making qio_channel_yield work on > AioContexts other than the main one. > > Signed-off-by: Paolo Bonzini <[email protected]> > --- > include/io/channel.h | 42 ++++++++++++++++++++++++++++++++++++++++++ > io/channel-socket.c | 16 +++++++++++----- > io/channel-tls.c | 12 ++++++++++++ > io/channel-watch.c | 6 ++++++ > io/channel.c | 25 +++++++++++++++++++++++++ > 5 files changed, 96 insertions(+), 5 deletions(-) >
> +++ b/io/channel-socket.c
> @@ -661,11 +661,6 @@ qio_channel_socket_set_blocking(QIOChannel *ioc,
> qemu_set_block(sioc->fd);
> } else {
> qemu_set_nonblock(sioc->fd);
> -#ifdef WIN32
> - WSAEventSelect(sioc->fd, ioc->event,
> - FD_READ | FD_ACCEPT | FD_CLOSE |
> - FD_CONNECT | FD_WRITE | FD_OOB);
> -#endif
> }
> return 0;
How does this hunk fit in?
> +++ 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
> +
Is it that you're moving it, now that the ability to associate handlers
lets you have more fine-grained control on when to adjust the properties?
Otherwise the patch makes sense to me.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
