From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTxmq-00083Y-F2 for qemu-devel@nongnu.org; Fri, 25 Nov 2011 10:34:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTxmp-0006pc-IH for qemu-devel@nongnu.org; Fri, 25 Nov 2011 10:34:00 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:46341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTxmp-0006pO-Cs for qemu-devel@nongnu.org; Fri, 25 Nov 2011 10:33:59 -0500 Message-ID: <4ECFB565.20409@adacore.com> Date: Fri, 25 Nov 2011 16:33:57 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <1314018774-27482-1-git-send-email-aliguori@us.ibm.com> <1314018774-27482-2-git-send-email-aliguori@us.ibm.com> <4E525C5A.8000208@redhat.com> <4E525D87.8010400@codemonkey.ws> <4E525E09.2000107@redhat.com> <4ECE7AA6.9070006@adacore.com> <4ECE7F38.4000704@redhat.com> <4ECF6CE7.3010800@adacore.com> <4ECF71FD.9090308@redhat.com> <4ECFAA34.6080309@adacore.com> <4ECFAB0E.7020603@redhat.com> In-Reply-To: <4ECFAB0E.7020603@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , Anthony Liguori , qemu-devel@nongnu.org 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