Subject: Re: Importing kqueue's from FreeBSD...
To: None <,>
From: Jonathan Lemon <>
List: tech-kern
Date: 03/15/2001 15:27:20
In article <local.mail.netbsd-tech-kern/> you write:
>On Thu, Mar 15, 2001 at 03:33:37PM +1100, Luke Mewburn wrote:
> > I'd like to bring these into -current, #ifdef-ed appropriatly, to
> > allow others to `bang' on the code as well.
> > 
> > Thoughts/comments?
>Why #ifdef'd?
>If we do get this, we should make select(2) and poll(2) use the same
>underlying "event" notification mechanism, instead of the current
>selinfo stuff.  It's pretty silly to have both.

I'd like to do that, but its not quite that simple.  I've been trying
to think of a clean way to accomplish this and haven't found one yet.

>kqueue, while being "generic", has no way to add filters, etc. without
>modifying the API -- to add a constant representing the filter, event,
>etc.  This is seriously broken and must be addressed if we're going to
>call it "generic".

Actually, the API was designed with a third syscall in mind: kfilter().
The idea here was to allow new filters to be dynamically loaded/registered
by the system, while keeping a small number of "standard" filters
available (read/write).  However, I never got around to doing this.