This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin 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: readv/writev


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


Attachment: signature.asc
Description: This is a digitally signed message part


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