On Wed, Sep 16, 2009 at 03:15:57AM +0000, Stacey Son wrote: > Author: sson > Date: Wed Sep 16 03:15:57 2009 > New Revision: 197240 > URL: http://svn.freebsd.org/changeset/base/197240 > > Log: > Add optional touch event filter hooks to kevents. > > The touch event filter is called when a kernel event data is possibly > updated. There are two hook points. First, during a kevent() system > call. Second, when an event has been triggered. > > Approved by: rwatson (co-mentor) > > Modified: > head/sys/kern/kern_event.c > head/sys/sys/event.h > > Modified: head/sys/sys/event.h > ============================================================================== > --- head/sys/sys/event.h Tue Sep 15 22:46:06 2009 (r197239) > +++ head/sys/sys/event.h Wed Sep 16 03:15:57 2009 (r197240) > struct filterops { > int f_isfd; /* true if ident == filedescriptor */ > int (*f_attach)(struct knote *kn); > void (*f_detach)(struct knote *kn); > int (*f_event)(struct knote *kn, long hint); > + void (*f_touch)(struct knote *kn, struct kevent *kev, long type); > }; > > /* > @@ -193,6 +204,7 @@ struct knote { > } kn_ptr; > struct filterops *kn_fop; > void *kn_hook; > + int kn_hookid; > You may want to add required padding to struct filterops and struct knote on stable/8 branch now, to be able to merge this after 8.0 is released without breaking KBI.
pgpTEwlTe3BDi.pgp
Description: PGP signature
