qemu-devel
[Top][All Lists]
Advanced

[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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/3] io: add methods to set I/O handlers on AioContext
Date: Wed, 4 Jan 2017 17:56:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 04/01/2017 17:45, Eric Blake wrote:
>> -#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?

Yes, I'm setting the event here because aio_set_fd_handler can also call
WSAEventSelect, and only one event can be in use at a time.  So you
cannot use qio_channel_create_socket_watch and qio_channel_yield at the
same time, but you can switch from one to the other.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]