|
AquilaOS documentation
How it works, and its code
|
Restarting, halting and powering off the machine (reboot()), and Ctrl+Alt+Del. More...
#include <core/system.h>#include <core/arch.h>#include <sys/proc.h>#include <sys/signal.h>#include <sys/reboot.h>#include <dev/dev.h>#include <aquila/errno.h>Go to the source code of this file.
Functions | |
| int | kernel_reboot (unsigned cmd) |
| Carries out a reboot() command. | |
| void | kernel_ctrlaltdel (void) |
| Handles Ctrl+Alt+Del from the keyboard, possibly in an interrupt: it restarts the machine, or sends SIGINT to init if init asked for that. | |
Variables | |
| static int | cad_restarts = 1 |
Restarting, halting and powering off the machine (reboot()), and Ctrl+Alt+Del.
Ctrl+Alt+Del restarts the machine right away, unless init asked for SIGINT instead (RB_DISABLE_CAD), to shut down cleanly.
Definition in file reboot.c.
| void kernel_ctrlaltdel | ( | void | ) |
Handles Ctrl+Alt+Del from the keyboard, possibly in an interrupt: it restarts the machine, or sends SIGINT to init if init asked for that.
Definition at line 62 of file reboot.c.
References arch_reboot(), cad_restarts, kernel_ctrlaltdel(), printk(), proc_pid_find(), and signal_proc_send().
Referenced by kernel_ctrlaltdel(), and vt_scancode().
| int kernel_reboot | ( | unsigned | cmd | ) |
Carries out a reboot() command.
Before restarting, halting or powering off, the disks' caches are written out.
| cmd | RB_AUTOBOOT, RB_HALT_SYSTEM, RB_POWER_OFF, RB_ENABLE_CAD or RB_DISABLE_CAD |
Definition at line 29 of file reboot.c.
References arch_halt(), arch_poweroff(), arch_reboot(), cad_restarts, kdev_sync(), kernel_reboot(), and printk().
Referenced by kernel_reboot(), and sys_reboot().
|
static |
Definition at line 18 of file reboot.c.
Referenced by kernel_ctrlaltdel(), and kernel_reboot().