lib/test_lockup.c
Source file repositories/reference/linux-study-clean/lib/test_lockup.c
File Facts
- System
- Linux kernel
- Corpus path
lib/test_lockup.c- Extension
.c- Size
- 16848 bytes
- Lines
- 621
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/delay.hlinux/sched.hlinux/sched/signal.hlinux/sched/clock.hlinux/cpu.hlinux/nmi.hlinux/mm.hlinux/uaccess.hlinux/file.h
Detected Declarations
function test_lockfunction test_unlockfunction test_alloc_pagesfunction test_free_pagesfunction test_waitfunction test_lockupfunction test_work_fnfunction test_kernel_ptrfunction access_okfunction test_magicfunction test_lockup_initfunction for_each_online_cpumodule init test_lockup_init
Annotated Snippet
module_init(test_lockup_init);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Konstantin Khlebnikov <khlebnikov@yandex-team.ru>");
MODULE_DESCRIPTION("Test module to generate lockups");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/delay.h`, `linux/sched.h`, `linux/sched/signal.h`, `linux/sched/clock.h`, `linux/cpu.h`, `linux/nmi.h`.
- Detected declarations: `function test_lock`, `function test_unlock`, `function test_alloc_pages`, `function test_free_pages`, `function test_wait`, `function test_lockup`, `function test_work_fn`, `function test_kernel_ptr`, `function access_ok`, `function test_magic`.
- Atlas domain: Kernel Services / lib.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.