config_intrhook man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

CONFIG_INTRHOOK(9)	 BSD Kernel Developer's Manual	    CONFIG_INTRHOOK(9)

     config_intrhook — schedule a function to be run after interrupts have
     been enabled, but before root is mounted

     #include <sys/kernel.h>

     config_intrhook_establish(struct intr_config_hook *hook);

     config_intrhook_disestablish(struct intr_config_hook *hook);

     The config_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 config_intrhook_disestablish() function removes the entry from the
     hook queue.

     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 config_intrhook_disestablish().  The boot
     process then proceeds to attempt to mount the root file system.  Any
     driver that can potentially provide devices they wish to be mounted as
     root must use either this hook, or probe all these devices in the initial
     probe.  Since interrupts are disabled during the probe process, many
     drivers need a method to probe for devices with interrupts enabled.

     The requests are made with the intr_config_hook structure.	 This struc‐
     ture is defined as follows:

     struct intr_config_hook {
	     TAILQ_ENTRY(intr_config_hook) ich_links;/* Private */
	     void    (*ich_func)(void *arg);	     /* 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 SI_SUB_INT_CONFIG_HOOKS(), which is imme‐
     diately after the scheduler is started, and just before the root file
     system device is discovered.

     A 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.


     These functions were introduced in FreeBSD 3.0 with the CAM subsystem,
     but are available for any driver to use.

     The functions were written by Justin Gibbs ⟨⟩.  This
     manual page was written by M. Warner Losh ⟨⟩.

BSD			      September 24, 2006			   BSD

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net