[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioC
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioContext |
Date: |
Wed, 4 Jan 2017 10:45:11 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
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 <address@hidden>
> ---
> 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
- Re: [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioContext,
Eric Blake <=