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: Conrad Scott Cc: cygwin-developers AT cygwin DOT com In-Reply-To: <025401c24a0d$1c996380$6132bc3e@BABEL> References: <019701c2494f$614e4a40$6132bc3e AT BABEL><1029971194 DOT 28132 DOT 16 DOT camel AT lifelesswks > <00c501c2496e$39ae2720$6132bc3e AT BABEL> <1029976536 DOT 27825 DOT 46 DOT camel AT lifelesswks> <025401c24a0d$1c996380$6132bc3e AT BABEL> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-p9IUdcncUQE4Qw6vNtoC" Date: 23 Aug 2002 09:48:06 +1000 Message-Id: <1030060087.8462.14.camel@lifelesswks> Mime-Version: 1.0 --=-p9IUdcncUQE4Qw6vNtoC Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2002-08-23 at 04:52, Conrad Scott wrote: > There's no comparison possible right now since the existing code ... K. =20 > I've looked at putting in readv/writev directly for disk files > etc. (pipes and raw devices would benefit as well) but a general > solution doesn't fit very well w/ the current structure of the > fhandler classes: for example, the text-mode vs binary-mode code > and something else I can't quite remember just now :-) Yah. One thing I've been pondering for a while - strip out all the text/binary translation for non FILE calls. I have done *any* research to see if there are text-dependent apps using fd based IO, but there probably are :p. > I'd have thought that overlapped was the reverse of the Posix > select/poll model. That is, in NT you issue your IO operation and > got told when it has completed, which allows for zero-copy IO and > for queues of operations (shades of VMS indeed);=20 Overlapped refers to capability for Win32 to have 'overlapping' IO's outstanding, not to a specific notification mechanism. The ReadFile/WSARecv interfaces support 3 interfaces I'm aware of: un-notified (select) notified via an event object (poll) notified via a completion port. > while the > select/poll model is the opposite: you get told when a read/write > would succeed if you were to do it. You can't, w/ select/poll, > issue a nonblocking IO operation and be told when it has completed > (except for the strange cases of accept and connect). And it's > not clear to me how to bridge that gap. USe WSAAsyncSelect and register for FD_WRITE and FD_READ. These get sent when a socket is ready for writing/reading. We then keep a table of the sockets we own, and update their state when we recieve the messages. Select and poll then become trivial querys into our state table. (If I misunderstood, and you wanted to emulate overlapped with select/poll - sorry :]). Rob --=-p9IUdcncUQE4Qw6vNtoC 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) iD8DBQA9ZXg2I5+kQ8LJcoIRAqxsAKCYDY4R2O1tkN/AX4NApPxyNtSm1QCeMjSE wfEhv6Buclwo2O3O5LRtqlw= =PN3N -----END PGP SIGNATURE----- --=-p9IUdcncUQE4Qw6vNtoC--