Expand description
OS lifecycle: shutdown, restart and sleep as an operating-system mechanism.
Privileged executables call request; the platform runs a Supervisor
that stops tasks, commits storage, stops drivers and finally asks the
system power device (/devices/power, contract in device::power) to
perform the hardware action through the VFS. Shutdown itself is not a
device. Controller is the lock-free state machine behind it: exactly
one request wins and phases only move forward.
The crate depends on no graphics stack, shell or particular filesystem.
Modules§
- tasks
- Cooperative task stop with a monotonic deadline, using only the public task manager API (relationships, signals and sleep).
Structs§
- Controller
- Lifecycle state machine. Phase, winning action and exit status share one atomic word so a request is published as a whole.
- Supervisor
- Runs the pipeline for a platform: quiesce the descendants of
task(exceptservices), commit storage, stop drivers, then perform the action through the power device.
Enums§
- Action
- Final action of a lifecycle request.
- Error
- Failure of a lifecycle request or pipeline stage.
- State
- Lifecycle phase. Phases only move forward.
Constants§
- POWER_
DEVICE_ PATH - System power device node, mounted by the platform.
Statics§
- SYSTEM
- The system-wide lifecycle controller.
Traits§
- Drivers
- Platform driver stop hook, run after storage was committed and unmounted.
- Stages
- Pipeline stages, executed in declaration order.
Supervisorprovides the system implementation; tests and special runtimes may provide others.
Functions§
- request
- Request
actionon behalf oftask.