drivers/usb/mon/mon_main.c
Source file repositories/reference/linux-study-clean/drivers/usb/mon/mon_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/mon/mon_main.c- Extension
.c- Size
- 9019 bytes
- Lines
- 424
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/usb.hlinux/usb/hcd.hlinux/slab.hlinux/notifier.hlinux/mutex.husb_mon.h
Detected Declarations
function mon_reader_addfunction mon_reader_delfunction mon_bus_submitfunction mon_submitfunction mon_bus_submit_errorfunction mon_submit_errorfunction mon_bus_completefunction mon_completefunction mon_stopfunction busfunction busfunction mon_notifyfunction mon_dissolvefunction mon_bus_dropfunction mon_bus_initfunction mon_bus0_initfunction mon_initfunction mon_exitmodule init mon_init
Annotated Snippet
module_init(mon_init);
module_exit(mon_exit);
MODULE_DESCRIPTION("USB Monitor");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/usb.h`, `linux/usb/hcd.h`, `linux/slab.h`, `linux/notifier.h`, `linux/mutex.h`, `usb_mon.h`.
- Detected declarations: `function mon_reader_add`, `function mon_reader_del`, `function mon_bus_submit`, `function mon_submit`, `function mon_bus_submit_error`, `function mon_submit_error`, `function mon_bus_complete`, `function mon_complete`, `function mon_stop`, `function bus`.
- Atlas domain: Driver Families / drivers/usb.
- 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.