diff options
Diffstat (limited to 'static/freebsd/man9/config_intrhook.9 3.html')
| -rw-r--r-- | static/freebsd/man9/config_intrhook.9 3.html | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/static/freebsd/man9/config_intrhook.9 3.html b/static/freebsd/man9/config_intrhook.9 3.html deleted file mode 100644 index a728940d..00000000 --- a/static/freebsd/man9/config_intrhook.9 3.html +++ /dev/null @@ -1,127 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">CONFIG_INTRHOOK(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">CONFIG_INTRHOOK(9)</td> - </tr> -</table> -<div class="manual-text"> -<section class="Sh"> -<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> -<p class="Pp"><code class="Nm">config_intrhook</code> — - <span class="Nd">schedule a function to be run after interrupts have been - enabled, but before root is mounted</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><code class="In">#include - <<a class="In">sys/kernel.h</a>></code></p> -<p class="Pp"><var class="Vt">typedef void (*ich_func_t)(void *arg);</var></p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">config_intrhook_establish</code>(<var class="Fa" style="white-space: nowrap;">struct - intr_config_hook *hook</var>);</p> -<p class="Pp"><var class="Ft">void</var> - <br/> - <code class="Fn">config_intrhook_disestablish</code>(<var class="Fa" style="white-space: nowrap;">struct - intr_config_hook *hook</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">config_intrhook_drain</code>(<var class="Fa" style="white-space: nowrap;">struct - intr_config_hook *hook</var>);</p> -<p class="Pp"><var class="Ft">void</var> - <br/> - <code class="Fn">config_intrhook_oneshot</code>(<var class="Fa" style="white-space: nowrap;">ich_func_t - func</var>, <var class="Fa" style="white-space: nowrap;">void - *arg</var>);</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The - <a class="permalink" href="#config_intrhook_establish"><code class="Fn" id="config_intrhook_establish">config_intrhook_establish</code></a>() - 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.</p> -<p class="Pp" id="config_intrhook_disestablish">The - <a class="permalink" href="#config_intrhook_disestablish"><code class="Fn">config_intrhook_disestablish</code></a>() - function removes the entry from the hook queue.</p> -<p class="Pp" id="config_intrhook_drain">The - <a class="permalink" href="#config_intrhook_drain"><code class="Fn">config_intrhook_drain</code></a>() - function removes the entry from the hook queue in a safe way. If the hook is - not currently active it removes <var class="Fa">hook</var> from the hook - queue and returns <var class="Vt">ICHS_QUEUED</var>. If the hook is active, - it waits for the hook to complete before returning - <var class="Vt">ICHS_RUNNING</var>. If the hook has previously completed, it - returns <var class="Vt">ICHS_DONE</var>. Because a - <var class="Vt">config_intrhook</var> is undefined prior to - <code class="Fn">config_intrhook_establish</code>(), this function may only - be called after that function has returned.</p> -<p class="Pp" id="config_intrhook_oneshot">The - <a class="permalink" href="#config_intrhook_oneshot"><code class="Fn">config_intrhook_oneshot</code></a>() - function schedules a function to be run as described for - <code class="Fn">config_intrhook_establish</code>(); the entry is - automatically removed from the hook queue after that function runs. This is - appropriate when additional device configuration must be done after - interrupts are enabled, but there is no need to stall the boot process after - that. This function allocates memory using M_WAITOK; do not call this while - holding any non-sleepable locks.</p> -<p class="Pp" id="config_intrhook_disestablish~2">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 - <a class="permalink" href="#config_intrhook_disestablish~2"><code class="Fn">config_intrhook_disestablish</code></a>(). - 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.</p> -<p class="Pp">The requests are made with the - <var class="Vt">intr_config_hook</var> structure. This structure is defined - as follows:</p> -<div class="Bd Pp Li"> -<pre>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 */ -};</pre> -</div> -<p class="Pp">Storage for the <var class="Vt">intr_config_hook</var> structure - must be provided by the driver. It must be stable from just before the hook - is established until after the hook is disestablished.</p> -<p class="Pp" id="SI_SUB_INT_CONFIG_HOOKS">Specifically, hooks are run at - <a class="permalink" href="#SI_SUB_INT_CONFIG_HOOKS"><code class="Fn">SI_SUB_INT_CONFIG_HOOKS</code></a>(), - which is immediately after the scheduler is started, and just before the - root file system device is discovered.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN - VALUES</a></h1> -<p class="Pp">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.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">DEVICE_ATTACH(9)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> -<p class="Pp">These functions were introduced in <span class="Ux">FreeBSD - 3.0</span> with the CAM subsystem, but are available for any driver to - use.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> -<p class="Pp">The functions were written by <span class="An">Justin Gibbs</span> - <<a class="Mt" href="mailto:gibbs@FreeBSD.org">gibbs@FreeBSD.org</a>>. - This manual page was written by <span class="An">M. Warner Losh</span> - <<a class="Mt" href="mailto:imp@FreeBSD.org">imp@FreeBSD.org</a>>.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">March 8, 2021</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
