From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTz4k-0006Lh-UY for qemu-devel@nongnu.org; Fri, 25 Nov 2011 11:56:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTz4k-0000DV-14 for qemu-devel@nongnu.org; Fri, 25 Nov 2011 11:56:34 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:43802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTz4j-0000DJ-Qr for qemu-devel@nongnu.org; Fri, 25 Nov 2011 11:56:33 -0500 Message-ID: <4ECFC8BF.6060303@adacore.com> Date: Fri, 25 Nov 2011 17:56:31 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <71e840e5-083a-48f1-b7e7-c9c0feaef35c@zmail13.collab.prod.int.phx2.redhat.com> In-Reply-To: <71e840e5-083a-48f1-b7e7-c9c0feaef35c@zmail13.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8 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 16:48, Paolo Bonzini wrote: >>> 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. > > Perhaps with two threads, but I think it's more complicated than > merging the handle/fd sets and doing a single poll. Why two threads? -- Fabien Chouteau