kernel_restart(9)
π kernel_restart(9) π
okay so welcome to the Kernel API Manual page for kernel_restart β yes, that's the manual name, and yes, we're doing reboots today. This is the function that reboots the system, and it's giving main-character energy at the very end of a kernel's life. π«Ά
πΈ NAME πΈ
kernel_restart β reboot the system π
β¨ SYNOPSIS β¨
void kernel_restart (char *cmd );
That's the whole signature, bestie: void, one char * named cmd. No cap. π¦
π ARGUMENTS π
cmdβ pointer to buffer containing command to execute for restart, orNULL. So like, hand it a buffer with the restart command, or just passNULLand let it be. β¨
π DESCRIPTION π
Shutdown everything and perform a clean reboot. That's the assignment. It's literally shutting everything down and doing a clean reboot, and the vibe is very "goodbye forever, but make it orderly." π
β οΈ Safety check: This is not safe to call in interrupt context. Like, do not. The original says it plainly, and I'm saying it with my whole chest: interrupt context is not the place for this. π
π¦ SEE ALSO π¦
Kernel file: ./kernel/reboot.c β that's the source-file bestie. Then the whole reboot/power-off friend group, all with their (9) manpage energy:
emergency_restart(9)register_reboot_notifier(9)unregister_reboot_notifier(9)register_restart_handler(9)unregister_restart_handler(9)do_kernel_restart(9)kernel_halt(9)register_sys_off_handler(9)unregister_sys_off_handler(9)devm_register_sys_off_handler(9)devm_register_power_off_handler(9)devm_register_restart_handler(9)register_platform_power_off(9)unregister_platform_power_off(9)do_kernel_power_off(9)kernel_can_power_off(9)kernel_power_off(9)orderly_poweroff(9)orderly_reboot(9)hw_failure_emergency_action_func(9)hw_failure_emergency_schedule(9)__hw_protection_trigger(9)
That's the page, bestie! Source/version: ./kernel Β· Date: October 2026 β mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms