lib/bust_spinlocks.c
Source file repositories/reference/linux-study-clean/lib/bust_spinlocks.c
File Facts
- System
- Linux kernel
- Corpus path
lib/bust_spinlocks.c- Extension
.c- Size
- 632 bytes
- Lines
- 30
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: implementation source
- Status
- source implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
Dependency Surface
linux/kernel.hlinux/printk.hlinux/spinlock.hlinux/tty.hlinux/wait.hlinux/vt_kern.hlinux/console.h
Detected Declarations
function bust_spinlocks
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* lib/bust_spinlocks.c
*
* Provides a minimal bust_spinlocks for architectures which don't
* have one of their own.
*
* bust_spinlocks() clears any spinlocks which would prevent oops, die(), BUG()
* and panic() information from reaching the user.
*/
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/spinlock.h>
#include <linux/tty.h>
#include <linux/wait.h>
#include <linux/vt_kern.h>
#include <linux/console.h>
void bust_spinlocks(int yes)
{
if (yes) {
++oops_in_progress;
} else {
console_unblank();
if (--oops_in_progress == 0)
wake_up_klogd();
}
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/printk.h`, `linux/spinlock.h`, `linux/tty.h`, `linux/wait.h`, `linux/vt_kern.h`, `linux/console.h`.
- Detected declarations: `function bust_spinlocks`.
- Atlas domain: Kernel Services / lib.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.