Subject: Re: merge of freebsd eventhandler
To: Hubert Feyrer <hubert@feyrer.de>
From: Brett Lymn <blymn@baesystems.com.au>
List: tech-kern
Date: 05/26/2006 10:26:33
On Thu, May 25, 2006 at 07:55:59PM +0200, Hubert Feyrer wrote:
>
> I think I've missed the manpage in your mail, and for us that don't know
> it the answer to the question "what does the FreeBSD eventhandler code do
> / what is it good for"?
>
I was going to grab the man page from FreeBSD but, apparently, there
is not one. I have been given the sources for a man page and I am
massaging that to include the new features I have added.
Eventhandler is meant to be a generic hook framework, it permits you
to set up a list of functions that you want to run when a particular
event occurs, for example, when a machine is put into sleep mode you
need to put some devices into sleep mode first. Devices that need to
be prepared for sleep mode can register a sleep function in a list
that is run before the sleep mode is initiated. The NetBSD kernel
already has a bunch of hooks that do various things but they are all
separate implementations. What I am aiming to do is replace all these
disparate implementations with a single generic interface and provide
a facility for further hooks to be added without reinventing the wheel
yet again.
--
Brett Lymn