This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support Windows in event-loop.c


On Thu, Apr 21, 2005 at 11:56:02AM -0700, Mark Mitchell wrote:
>Eli Zaretskii wrote:
>>Is it perhaps possible to write an emulation of `select' that would
>>handle file handles as well
>
>Well, Cygwin has select, so it is *possible*.  But, it's not easy, and
>it doesn't really map terribly well onto what Windows provides.

cygwin's select is pretty complicated but most of that is due to thread
safety considerations.  If there are only a limited number of types of
devices being selected, it should be possible to mock something up
without only marginal pain.

What kind of things are being "selected"?  I'm surprised that
WaitForMultipleObjects would be all that useful here since, except in
the case of console I/O, it only really is used for event (e.g., events,
semaphores, mutexes, thread termination) types of operations.  It
wouldn't be useful for pipes, for instance.  And it wouldn't be useful
for serial I/O unless the serial device was opened on overlapped mode.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]