Mail Archives: cygwin-developers/2002/08/22/19:50:35
--=-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--
- Raw text -