kernel/power/main.c
Source file repositories/reference/linux-study-clean/kernel/power/main.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/power/main.c- Extension
.c- Size
- 28623 bytes
- Lines
- 1162
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/export.hlinux/init.hlinux/kobject.hlinux/string.hlinux/pm-trace.hlinux/workqueue.hlinux/debugfs.hlinux/seq_file.hlinux/suspend.hlinux/syscalls.hlinux/pm_runtime.hlinux/atomic.hlinux/wait.hpower.h
Detected Declarations
struct suspend_statsfunction pm_restore_gfp_maskfunction pm_restrict_gfp_maskfunction lock_system_sleepfunction unlock_system_sleepfunction ksys_sync_helperfunction pm_fs_sync_completedfunction pm_fs_sync_work_fnfunction pm_sleep_fs_syncfunction register_pm_notifierfunction unregister_pm_notifierfunction pm_notifier_call_chain_robustfunction pm_notifier_call_chainfunction pm_async_setupfunction pm_async_showfunction pm_async_storefunction mem_sleep_showfunction decode_suspend_statefunction mem_sleep_storefunction sync_on_suspend_showfunction sync_on_suspend_storefunction pm_test_showfunction pm_test_storefunction dpm_save_failed_devfunction dpm_save_failed_stepfunction dpm_save_errnofunction pm_report_hw_sleep_timefunction pm_report_max_hw_sleepfunction last_failed_dev_showfunction last_failed_errno_showfunction last_failed_step_showfunction suspend_attr_is_visiblefunction suspend_stats_showfunction pm_debugfs_initfunction pm_sleep_transition_in_progressfunction pm_print_times_showfunction pm_print_times_storefunction pm_print_times_initfunction pm_wakeup_irq_showfunction pm_debug_messages_should_printfunction pm_debug_messages_showfunction pm_debug_messages_storefunction pm_debug_messages_setupfunction pm_print_times_initfunction showfunction decode_statefunction state_storefunction wakeup_count_show
Annotated Snippet
core_initcall(pm_init);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/export.h`, `linux/init.h`, `linux/kobject.h`, `linux/string.h`, `linux/pm-trace.h`, `linux/workqueue.h`, `linux/debugfs.h`.
- Detected declarations: `struct suspend_stats`, `function pm_restore_gfp_mask`, `function pm_restrict_gfp_mask`, `function lock_system_sleep`, `function unlock_system_sleep`, `function ksys_sync_helper`, `function pm_fs_sync_completed`, `function pm_fs_sync_work_fn`, `function pm_sleep_fs_sync`, `function register_pm_notifier`.
- 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.