diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:59:05 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:59:05 -0400 |
| commit | 1f19f33e45791ea59aed048796fc68672c6723a5 (patch) | |
| tree | 54625fba89e91d1c2177801ec635e8528bba937f /static/freebsd/man9/panic.9 3.html | |
| parent | ac5e55f5f2af5b92794c2aded46c6bae85b5f5ed (diff) | |
docs: Removed Precompiled HTML
Diffstat (limited to 'static/freebsd/man9/panic.9 3.html')
| -rw-r--r-- | static/freebsd/man9/panic.9 3.html | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/static/freebsd/man9/panic.9 3.html b/static/freebsd/man9/panic.9 3.html deleted file mode 100644 index afde7a46..00000000 --- a/static/freebsd/man9/panic.9 3.html +++ /dev/null @@ -1,114 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">PANIC(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">PANIC(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">panic</code> — <span class="Nd">bring down - system on fatal error</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/types.h</a>></code> - <br/> - <code class="In">#include <<a class="In">sys/systm.h</a>></code></p> -<p class="Pp"><var class="Vt">extern char *panicstr;</var></p> -<p class="Pp"><var class="Ft">void</var> - <br/> - <code class="Fn">panic</code>(<var class="Fa" style="white-space: nowrap;">const - char *fmt</var>, - <var class="Fa" style="white-space: nowrap;">...</var>);</p> -<p class="Pp"><var class="Ft">void</var> - <br/> - <code class="Fn">vpanic</code>(<var class="Fa" style="white-space: nowrap;">const - char *fmt</var>, <var class="Fa" style="white-space: nowrap;">va_list - ap</var>);</p> -<p class="Pp"><code class="Fn">KERNEL_PANICKED</code>();</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="#panic"><code class="Fn" id="panic">panic</code></a>() - and <code class="Fn">vpanic</code>() functions terminate the running system. - The message <var class="Fa">fmt</var> is a <a class="Xr">printf(3)</a> style - format string. The message is printed to the console and - <var class="Va">panicstr</var> is set pointing to the address of the message - text. This can be retrieved from a core dump at a later time.</p> -<p class="Pp" id="panic~2">Upon entering the - <a class="permalink" href="#panic~2"><code class="Fn">panic</code></a>() - function the panicking thread disables interrupts and calls - <a class="Xr">critical_enter(9)</a>. This prevents the thread from being - preempted or interrupted while the system is still in a running state. Next, - it will instruct the other CPUs in the system to stop. This synchronizes - with other threads to prevent concurrent panic conditions from interfering - with one another. In the unlikely event of concurrent panics, only one - panicking thread will proceed.</p> -<p class="Pp" id="kdb_enter">Control will be passed to the kernel debugger via - <a class="permalink" href="#kdb_enter"><code class="Fn">kdb_enter</code></a>(). - This is conditional on a debugger being installed and enabled by the - <var class="Va">debugger_on_panic</var> variable; see - <a class="Xr">ddb(4)</a> and <a class="Xr">gdb(4)</a>. The debugger may - initiate a system reset, or it may eventually return.</p> -<p class="Pp" id="panic~3">Finally, <a class="Xr">kern_reboot(9)</a> is called - to restart the system, and a kernel dump will be requested. If - <a class="permalink" href="#panic~3"><code class="Fn">panic</code></a>() is - called recursively (from the disk sync routines, for example), - <a class="permalink" href="#kern_reboot"><code class="Fn" id="kern_reboot">kern_reboot</code></a>() - will be instructed not to sync the disks.</p> -<p class="Pp" id="vpanic">The - <a class="permalink" href="#vpanic"><code class="Fn">vpanic</code></a>() - function implements the main body of <code class="Fn">panic</code>(). It is - suitable to be called by functions which perform their own variable-length - argument processing. In all other cases, <code class="Fn">panic</code>() is - preferred.</p> -<p class="Pp" id="KERNEL_PANICKED">The - <a class="permalink" href="#KERNEL_PANICKED"><code class="Fn">KERNEL_PANICKED</code></a>() - macro is the preferred way to determine if the system has panicked. It - returns a boolean value. Most often this is used to avoid taking an action - that cannot possibly succeed in a panic context.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="EXECUTION_CONTEXT"><a class="permalink" href="#EXECUTION_CONTEXT">EXECUTION - CONTEXT</a></h1> -<p class="Pp">Once the panic has been initiated, code executing in a panic - context is subject to the following restrictions:</p> -<ul class="Bl-bullet"> - <li>Single-threaded execution. The scheduler is disabled, and other CPUs are - stopped/forced idle. Functions that manipulate the scheduler state must be - avoided. This includes, but is not limited to, <a class="Xr">wakeup(9)</a> - and <a class="Xr">sleepqueue(9)</a> functions.</li> - <li>Interrupts are disabled. Device I/O (e.g. to the console) must be achieved - with polling.</li> - <li>Dynamic memory allocation cannot be relied on, and must be avoided.</li> - <li>Lock acquisition/release will be ignored, meaning these operations will - appear to succeed.</li> - <li>Sleeping on a resource is not strictly prohibited, but will result in an - immediate return from the sleep function. Time-based sleeps such as - <a class="Xr">pause(9)</a> may be performed as a busy-wait.</li> -</ul> -</section> -<section class="Sh"> -<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN - VALUES</a></h1> -<p class="Pp">The <code class="Fn">panic</code>() and - <code class="Fn">vpanic</code>() functions do not return.</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">printf(3)</a>, <a class="Xr">ddb(4)</a>, - <a class="Xr">gdb(4)</a>, <a class="Xr">KASSERT(9)</a>, - <a class="Xr">kern_reboot(9)</a></p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">March 17, 2023</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
