[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_ad
From: |
Fabien Chouteau |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch |
Date: |
Fri, 25 Nov 2011 16:33:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Mnenhy/0.8.4 Thunderbird/3.1.15 |
On 25/11/2011 15:49, Paolo Bonzini wrote:
> On 11/25/2011 03:46 PM, Fabien Chouteau wrote:
>>> > slirp is fd_set---thus select()---based. iohandler too, though it would
>>> > likely be simpler to switch it to poll().
>> Right, for slirp and iohandler, but it seems wrong to take file
>> descriptors from g_main_context_query() and put them in the fd_sets for
>> select(). This part is still in the code today.
>
> It's ugly, but it works.
For Windows I'm not sure it will work.
> There's a fundamental impedence mismatch between glib and
> slirp/iohandler. Either you convert glib's pollfds to fd_sets, or you
> take slirp and iohandler's fd_sets and put them in pollfds.
> Converting slirp and iohandler to produce pollfds is not easy because
> Windows does not have poll---so you'd still have a pollfd-to-fd_set
> conversion somewhere.
Is it possible to use both? Keep the select scheme for iohandlers and
slirp, but use g_main_context_iteration() for Glib stuff.
> Believe me, I thought this through. :)
>
I know, I just try to understand ;)
--
Fabien Chouteau
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Fabien Chouteau, 2011/11/24
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Paolo Bonzini, 2011/11/24
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Fabien Chouteau, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Paolo Bonzini, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Fabien Chouteau, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Paolo Bonzini, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch,
Fabien Chouteau <=
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Paolo Bonzini, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Fabien Chouteau, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Paolo Bonzini, 2011/11/25
- Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch, Fabien Chouteau, 2011/11/28