|
NAMEconfig_intrhook —
schedule a function to be run after interrupts have been
enabled, but before root is mounted
SYNOPSIS#include <sys/kernel.h>
typedef void (*ich_func_t)(void *arg); int
void
int
void
DESCRIPTIONTheconfig_intrhook_establish () function schedules a
function to be run after interrupts have been enabled, but before root is
mounted. If the system has already passed this point in its initialization,
the function is called immediately.
The The The Before root is mounted, all the previously established hooks are
run. The boot process is then stalled until all handlers remove their hook
from the hook queue with
The requests are made with the intr_config_hook structure. This structure is defined as follows: struct intr_config_hook { TAILQ_ENTRY(intr_config_hook) ich_links;/* Private */ ich_func_t ich_func; /* function to call */ void *ich_arg; /* Argument to call */ }; Storage for the intr_config_hook structure must be provided by the driver. It must be stable from just before the hook is established until after the hook is disestablished. Specifically, hooks are run at
RETURN VALUESA zero return value means the hook was successfully added to the queue (with either deferred or immediate execution). A non-zero return value means the hook could not be added to the queue because it was already on the queue.SEE ALSODEVICE_ATTACH(9)HISTORYThese functions were introduced in FreeBSD 3.0 with the CAM subsystem, but are available for any driver to use.AUTHORSThe functions were written by Justin Gibbs <gibbs@FreeBSD.org>. This manual page was written by M. Warner Losh <imp@FreeBSD.org>.
Visit the GSP FreeBSD Man Page Interface. |