pub fn inject_restart_handler(handler: fn(ExitCode))Expand description
Injects a handler that can restart the system.
The function may be called only once; subsequent calls take no effect.
Note that, depending on the specific architecture, OSTD may already have a built-in handler. If so, calling this function outside of OSTD will never take effect. Currently, it happens in
- x86_64: Never;
- riscv64: Always;
- loongarch64: Never.