PATCH: Support Windows in event-loop.c

Mark Mitchell mark@codesourcery.com
Fri Apr 22 15:52:00 GMT 2005


Christopher Faylor wrote:

> Well, again, I have a rather major technical concern about the use of
> WaitForMultipleObjects in this scenario, so as the Windows maintainer,
> I'd like to see that addressed.  You can't reliably just use
> WaitForMultiple on, say, a serial port, a socket, or a pipe, so I don't
> know how this would ever work.

Very fair question.  And, of course, packaging up WaitForMultipleObjects 
into select isn't going to be useful if it's not even the right API. 
With the current set of patches, which only support remote debugging, 
the only thing that shows up in the console input handle, for which you 
can use WaitForMultipleObjects.

To really implement select, with reasonable performance, I think you 
have to do actually spawn multiple threads, to use the appropriate way 
of waiting for different things.  My plan here was that when that 
situation arose we would have those threads signal an Event, which 
WaitForMultipleObjects can process.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gdb-patches mailing list