kernel/locking/locktorture.c
Source file repositories/reference/linux-study-clean/kernel/locking/locktorture.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/locking/locktorture.c- Extension
.c- Size
- 40320 bytes
- Lines
- 1451
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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/kthread.hlinux/sched/rt.hlinux/spinlock.hlinux/mutex.hlinux/rwsem.hlinux/smp.hlinux/interrupt.hlinux/sched.huapi/linux/sched/types.hlinux/rtmutex.hlinux/atomic.hlinux/moduleparam.hlinux/delay.hlinux/slab.hlinux/torture.hlinux/reboot.hasm/rqspinlock.hlinux/ww_mutex.hlinux/percpu-rwsem.h
Detected Declarations
struct lock_stress_statsstruct call_rcu_chainstruct lock_torture_opsstruct lock_torture_cxtstruct reorder_lockfunction param_set_cpumaskfunction param_get_cpumaskfunction cpumask_nonemptyfunction torture_lock_busted_write_lockfunction torture_lock_busted_write_delayfunction torture_lock_busted_write_unlockfunction torture_rt_boostfunction torture_spin_lock_write_lockfunction torture_spin_lock_write_delayfunction torture_spin_lock_write_unlockfunction torture_spin_lock_write_lock_irqfunction torture_lock_spin_write_unlock_irqfunction torture_raw_spin_lock_write_lockfunction torture_raw_spin_lock_write_unlockfunction torture_raw_spin_lock_write_lock_irqfunction torture_raw_spin_lock_write_unlock_irqfunction torture_raw_res_spin_write_lockfunction torture_raw_res_spin_write_unlockfunction torture_raw_res_spin_write_lock_irqfunction torture_raw_res_spin_write_unlock_irqfunction torture_rwlock_write_lockfunction torture_rwlock_write_delayfunction torture_rwlock_write_unlockfunction torture_rwlock_read_lockfunction torture_rwlock_read_delayfunction torture_rwlock_read_unlockfunction torture_rwlock_write_lock_irqfunction torture_rwlock_write_unlock_irqfunction torture_rwlock_read_lock_irqfunction torture_rwlock_read_unlock_irqfunction torture_mutex_initfunction torture_mutex_nested_lockfunction torture_mutex_lockfunction torture_mutex_delayfunction torture_mutex_unlockfunction torture_mutex_nested_unlockfunction torture_ww_mutex_initfunction torture_ww_mutex_exitfunction torture_ww_mutex_lockfunction list_for_each_entryfunction torture_ww_mutex_unlockfunction torture_rtmutex_initfunction torture_rtmutex_nested_lock
Annotated Snippet
module_init(lock_torture_init);
module_exit(lock_torture_cleanup);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/kthread.h`, `linux/sched/rt.h`, `linux/spinlock.h`, `linux/mutex.h`, `linux/rwsem.h`, `linux/smp.h`.
- Detected declarations: `struct lock_stress_stats`, `struct call_rcu_chain`, `struct lock_torture_ops`, `struct lock_torture_cxt`, `struct reorder_lock`, `function param_set_cpumask`, `function param_get_cpumask`, `function cpumask_nonempty`, `function torture_lock_busted_write_lock`, `function torture_lock_busted_write_delay`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- 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.