Subject: Re: generic hook infrastructure
To: None <wrstuden@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 02/03/2006 12:11:35
> > > 1) deregister a hook function after it has run, some of our hooks to
> > > this to prevent them being run again.
> > 
> > You mean an one-shot modus? I'd say make the hook-removal O(1) with
> > small O(1) and it can be implemented completely via a wrapper function.
> 
> Yeah, but I thought the whole point of this was to make a common resource
> that captures common behavior.  :-) If we know that we want to
> remove-after-use all the items on a list, then it seems simpler to have
> the itterator do it. We then have one hook-remove call rather than one per
> called routine.

making a primitive complex for rarely used features is a bad idea, IMO.
(cf. lockmgr :-)

unless it's supposed to be used for fast path like pfil as well,
i don't care, tho.

YAMAMOTO Takashi