Subject: Re: FIONWRITE proposal
To: David Brownlee <abs@NetBSD.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/19/2004 18:08:19
--K8nIJk4ghYZn606h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Oct 19, 2004 at 10:11:09PM +0100, David Brownlee wrote:
>=20
> 	The suggested ioctl() would allows a check for sufficent
> 	write space on a socket. At first glance the same could be
> 	done by polling with poll(). What does the ioctl() give
> 	you that a poll() on that one fd with instant timeout
> 	doesn't, other than slightly less overhead setup?

Two things:

1) The ioctl tells exactly how much space available

2) I see it as a lot less overhead. This ioctl copies out 4 bytes of data. =
=20
poll() will copy in and out more data, and go wandering through more
complicated code paths. Also, to use poll() like this seems like an abuse.

Take care,

Bill

--K8nIJk4ghYZn606h
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFBdbqDWz+3JHUci9cRAt8xAKCRyTsiEY8UzaXldhw9T0uTU3kBIQCfRl4Q
9FOUDHzSI0I1Gkm5sgjfwF8=
=Upf9
-----END PGP SIGNATURE-----

--K8nIJk4ghYZn606h--