Subject: Re: FIONWRITE proposal
To: Bill Studenmund <wrstuden@netbsd.org>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: tech-kern
Date: 10/18/2004 22:00:17
> The functionality (well FIONSPACE) would be the same. I believe this 
> duplication is needed as it is not exact duplication. kevent is, as its 
> name implies, an event framework. If your application is set up so that 
> being able to write works as an event, then this filter is perfect. If, 
> however, the app isn't set up for being able to write == an event, then 
> this filter doesn't help.

I must admit that I never wrote any code using kqueue/kevent, but would
calling kevent(2) with a zero timeout help? If no event is returned, then
it means that there is no space. Otherwise you use the value of _data_
just returned.

> As for your second point, "why not do what this filter does for buffer 
> exhaustion," well, the filter does nothing. It really is just reporting 
> how much space is open in the buffer; the text you quote is ignoring all 
> the issues I've raised. :-)

I suspected it. Maybe doing nothing is enough? If it isn't, shouldn't the
filter be fixed, too? (If an implementation of FIONSPACE which cares about
those issues is ever written.) I just think that consistency would be good.

Bye	Pavel