RFA: Various Windows (mingw32) additions, mostly relating to select or serial ports

Daniel Jacobowitz drow@false.org
Mon Feb 6 04:03:00 GMT 2006


On Sun, Feb 05, 2006 at 07:27:41PM -0800, Ian Lance Taylor wrote:
> I guess I had assumed that you were going to have a thread around all
> the time anyhow.  Is creating a thread on Windows so cheap that one
> can do it every time gdb calls select?

Yes, it is that cheap.  But I wasn't clear - we have the thread the
whole time, but we don't rely on it; it goes to sleep and we wake it
when selecting.  It only polls when GDB is idle in a select call for
this fd.

(Actually, I think that it continues to poll for some time afterwards
until the next byte of data does arrive on that pipe, or the pipe's
closed.  That's just because (A) it's cheap, and (B) I had no other
reason to have a cleanup hook after the end of select.)

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list