From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 847 invoked by alias); 25 Apr 2005 16:24:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 710 invoked from network); 25 Apr 2005 16:24:03 -0000 Received: from unknown (HELO cgf.cx) (66.30.17.189) by sourceware.org with SMTP; 25 Apr 2005 16:24:03 -0000 Received: by cgf.cx (Postfix, from userid 201) id F040713C0BA; Mon, 25 Apr 2005 12:23:59 -0400 (EDT) Date: Mon, 25 Apr 2005 16:24:00 -0000 From: Christopher Faylor To: Mark Mitchell , gdb-patches@sources.redhat.com, "M.M. Kettenis" , Ian Lance Taylor Subject: Re: PATCH: Support Windows in event-loop.c Message-ID: <20050425162359.GF6543@trixie.casa.cgf.cx> Mail-Followup-To: Mark Mitchell , gdb-patches@sources.redhat.com, "M.M. Kettenis" , Ian Lance Taylor References: <7320615710191969@webhare> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00317.txt.bz2 On Mon, Apr 25, 2005 at 12:08:16PM -0400, Ian Lance Taylor wrote: >> > Ok... So, is it acceptable to include a console-only implementation in >> > event-loop.c? I would think that it wasn't. >> > That seems to suggest that some kind of generic select or poll >> > implementation needs to be developed, probably using threads. >> >> Over my dead body (the threads part that is). > >It has to be done with threads on Windows. But the threads don't >escape from the select emulation. They are just tiny little threads >which sit around waiting for something to happen on a file descriptor, >and which post an event when it does. If we were comfortable with the concept of polling, I don't see any reason why this couldn't be done in a polling loop rather than using threads. If polling isn't an option then the only way to do this is with threads. The cygwin select code might provide a clue as to how we do some of this but I think there might be ownership issues with using it in gdb. I'd have no problem including it but getting someone at Red Hat to focus on the issue long enough to provide a statement of assent would probably be difficult. cgf