DOHOOKS(9) BSD Kernel Manual DOHOOKS(9)
dohooks - run all hooks in a list
#include <sys/types.h>
#include <sys/systm.h>
void
dohooks(struct hook_desc_head *head, int flags);
The dohooks() function invokes all hooks established using the
hook_establish(9) function. Hooks are called in the order of the TAILQ
that head points to, however hook_establish(9) can put the hooks either
at the head or the tail of that queue, making it possible to call the
hooks either in the order of establishment, or its reverse.
The flags can specify HOOK_REMOVE to remove already processed hooks from
the hook list and HOOK_FREE to also free them. In most cases either no
flags should be used or HOOK_REMOVE and HOOK_FREE at the same time, since
just HOOK_REMOVE will drop the only reference to allocated memory and
should only be used in situations where freeing memory would be illegal
and unnecessary.
This function is used to implement the doshutdownhooks(9) as well as the
dostartuphooks(9) macros.
doshutdownhooks(9), dostartuphooks(9), hook_establish(9)
MirOS BSD #10-current July 27, 2001 1
Generated on 2013-04-27 00:20:00 by $MirOS: src/scripts/roff2htm,v 1.77 2013/01/01 20:49:09 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2013 The MirOS Project, Germany.
This product includes material
provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.