readv/writev

Robert Collins rbcollins@cygwin.com
Mon Aug 26 07:38:00 GMT 2002


On Tue, 2002-08-27 at 00:29, Corinna Vinschen wrote:
> On Mon, Aug 26, 2002 at 03:20:00PM +0100, Conrad Scott wrote:
> > "Christopher Faylor" <cgf@redhat.com> wrote:
> > > There shouldn't really be that much overhead to the current
> > method for
> > > handling text/binary reads, though.  It's just checking a bit
> > field.
> > 
> > At the coal-face it ends up being a bit more messy than that.  For
> > example, the fhandler::read code checks the readahead buffers for
> > pending data but they will always be empty in binary-mode (AFAIK)
> > . In fact there's a page of code before the check for whether a
> > binary read is being done and only then does the code escape back
> > to the caller.  Since (AFAIK) you can't change the text/binary
> > mode of an fd once it's been opened (and thus the readahead
> 
> You can.  setmode(fd, O_TEXT); or setmode(fd, O_BINARY);

Which is why I was suggesting stripping O_TEXT capability for raw FD's,
and making the TEXT translation only ever apply to the FILE * calls -
fprintf, fscanf, fread etc...

It allows all the fd level code to be much much simpler.

Rob


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20020826/b980800b/attachment.sig>


More information about the Cygwin-developers mailing list