This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Support Windows in event-loop.c
- From: Christopher Faylor <me at cgf dot cx>
- To: Mark Mitchell <mark at codesourcery dot com>,gdb-patches at sources dot redhat dot com,"M.M. Kettenis" <m dot m dot kettenis at alumnus dot utwente dot nl>,Ian Lance Taylor <ian at airs dot com>
- Date: Mon, 25 Apr 2005 12:23:59 -0400
- Subject: Re: PATCH: Support Windows in event-loop.c
- References: <7320615710191969@webhare> <m3y8b67sb3.fsf@gossamer.airs.com>
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