lib/test_workqueue.c
Source file repositories/reference/linux-study-clean/lib/test_workqueue.c
File Facts
- System
- Linux kernel
- Corpus path
lib/test_workqueue.c- Extension
.c- Size
- 7045 bytes
- Lines
- 295
- 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/init.hlinux/kernel.hlinux/module.hlinux/workqueue.hlinux/kthread.hlinux/moduleparam.hlinux/completion.hlinux/atomic.hlinux/slab.hlinux/ktime.hlinux/cpumask.hlinux/sched.hlinux/sort.hlinux/fs.h
Detected Declarations
struct thread_ctxfunction bench_work_fnfunction bench_kthread_fnfunction cmp_u64function set_affn_scopefunction run_benchfunction test_workqueue_initmodule init test_workqueue_init
Annotated Snippet
module_init(test_workqueue_init);
MODULE_AUTHOR("Breno Leitao <leitao@debian.org>");
MODULE_DESCRIPTION("Stress/performance benchmark for workqueue subsystem");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/module.h`, `linux/workqueue.h`, `linux/kthread.h`, `linux/moduleparam.h`, `linux/completion.h`, `linux/atomic.h`.
- Detected declarations: `struct thread_ctx`, `function bench_work_fn`, `function bench_kthread_fn`, `function cmp_u64`, `function set_affn_scope`, `function run_bench`, `function test_workqueue_init`, `module init test_workqueue_init`.
- 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.