Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Subject: Re: readv/writev From: Robert Collins To: cygwin-developers AT cygwin DOT com In-Reply-To: <20020826162921.M5475@cygbert.vinschen.de> References: <00c501c2496e$39ae2720$6132bc3e AT BABEL> <1029976536 DOT 27825 DOT 46 DOT camel AT lifelesswks> <025401c24a0d$1c996380$6132bc3e AT BABEL> <1030060087 DOT 8462 DOT 14 DOT camel AT lifelesswks> <20020824191035 DOT GB27153 AT redhat DOT com> <018201c24d0b$aa2d26e0$6132bc3e AT BABEL> <20020826162921 DOT M5475 AT cygbert DOT vinschen DOT de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-SiP1R21S2BPg/zp+uwQX" Date: 27 Aug 2002 00:38:09 +1000 Message-Id: <1030372690.13255.78.camel@lifelesswks> Mime-Version: 1.0 --=-SiP1R21S2BPg/zp+uwQX Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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" 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. > >=20 > > 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 >=20 > 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 --=-SiP1R21S2BPg/zp+uwQX Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA9aj1RI5+kQ8LJcoIRAm6OAJ4s5FLVCRqiCKgBbGyx2VPpayJDOACggkHk GaH3QLrAraso6xJ9hwPaywQ= =WTBD -----END PGP SIGNATURE----- --=-SiP1R21S2BPg/zp+uwQX--