Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@airs.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Daniel Jacobowitz <drow@false.org>,
	Christopher Faylor <me@cgf.cx>,
	gdb-patches@sources.redhat.com
Subject: Re: PATCH: Support Windows in event-loop.c
Date: Mon, 25 Apr 2005 15:50:00 -0000	[thread overview]
Message-ID: <m34qdu97qm.fsf@gossamer.airs.com> (raw)
In-Reply-To: <426D0C1D.8040600@codesourcery.com>

Mark Mitchell <mark@codesourcery.com> writes:

> Now, assuming I can do this, do y'all want me to try to put this in
> libiberty, or in GDB itself?

I suspect that a select which can works on Windows named pipes can
only be implemented in conjunction with an I/O library for reading
from the pipes.  This is because to make select work properly, the
thread which is responsible for the pipe has to actually read some
data from the pipe.  At least the last time I looked, there is no way
to wait for a pipe to have some data available.  There is a
PeekNamedPipe (I think) call which can check whether there is data
available, but the only way to use that is to busy wait.  So that
means that the thread will have read some data which the main program
wants.  And the only reasonable way I see to handle that is to provide
an interface to read from the descriptor which will check whether any
data was read by the read.

In other words, you need not just a select emulation, but also a read
emulation, and the two have to work together.  And really to make that
work reasonably, you will need to emulate open, close and write also.
And that we get into socket and pipe.

So that is crazy.  We don't want to emulate select.  I think it would
make more sense to add an argument to add_file_handler which indicates
the type of the file descriptor.  Then split up event-loop.c into
generic code, Unix specific code, and Windows specific code.

Ian


  parent reply	other threads:[~2005-04-25 15:50 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21  5:53 Mark Mitchell
2005-04-21 18:46 ` Eli Zaretskii
2005-04-21 18:49   ` Daniel Jacobowitz
2005-04-21 18:56   ` Mark Mitchell
2005-04-21 20:30     ` Eli Zaretskii
2005-04-21 20:56       ` Daniel Jacobowitz
2005-04-21 21:15         ` Mark Mitchell
2005-04-22  8:26           ` Eli Zaretskii
2005-04-22 12:08             ` Christopher Faylor
2005-04-22 13:23               ` Eli Zaretskii
2005-04-22 15:04                 ` Christopher Faylor
2005-04-22 15:14                   ` Ian Lance Taylor
2005-04-22 15:28                     ` Christopher Faylor
2005-04-22 15:52               ` Mark Mitchell
2005-04-22  8:16         ` Eli Zaretskii
2005-04-24 22:18           ` Daniel Jacobowitz
2005-04-24 22:30             ` Mark Kettenis
2005-04-25  0:04               ` Mark Mitchell
2005-04-24 23:57             ` Mark Mitchell
2005-04-25  4:25               ` Christopher Faylor
2005-04-25 13:16                 ` Daniel Jacobowitz
2005-04-25 14:50                   ` Christopher Faylor
2005-04-25 14:59                     ` Mark Mitchell
2005-04-25 15:04                       ` Daniel Jacobowitz
2005-04-25 15:18                         ` Mark Mitchell
2005-04-25 15:23                           ` Daniel Jacobowitz
2005-04-25 15:26                             ` Mark Mitchell
2005-04-25 15:36                               ` Daniel Jacobowitz
2005-04-25 16:44                                 ` Eli Zaretskii
2005-04-25 20:23                                 ` Mark Mitchell
2005-04-25 21:07                                   ` Eli Zaretskii
2005-04-25 21:49                                     ` Mark Mitchell
2005-04-25 22:00                                       ` Mark Kettenis
2005-04-25 22:09                                         ` Mark Mitchell
2005-04-25 22:29                                           ` Mark Kettenis
2005-04-25 22:47                                             ` Mark Mitchell
2005-04-26  3:55                                             ` Eli Zaretskii
2005-04-25 23:16                                       ` Christopher Faylor
2005-04-25 23:20                                         ` Mark Mitchell
2005-04-25 23:33                                           ` Christopher Faylor
2005-04-26  0:21                                             ` Mark Mitchell
2005-04-26  3:58                                           ` Eli Zaretskii
2005-04-26  3:59                                             ` Mark Mitchell
2005-04-25 15:50                               ` Ian Lance Taylor [this message]
2005-04-26  3:49                         ` Eli Zaretskii
2005-04-26 13:17                           ` Daniel Jacobowitz
2005-04-25 15:52                     ` M.M. Kettenis
2005-04-25 16:00                       ` Daniel Jacobowitz
2005-04-25 16:08                       ` Ian Lance Taylor
2005-04-25 16:24                         ` Christopher Faylor
2005-04-25 17:08                       ` Mark Mitchell
2005-04-25 21:04                         ` Eli Zaretskii
2005-04-25 16:42                     ` Eli Zaretskii
2005-04-21 21:01     ` Christopher Faylor
2005-04-21 21:03       ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34qdu97qm.fsf@gossamer.airs.com \
    --to=ian@airs.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark@codesourcery.com \
    --cc=me@cgf.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox