AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
reboot.h File Reference
#include <aquila/reboot.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.

Function Documentation

◆ kernel_ctrlaltdel()

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().

◆ kernel_reboot()

int kernel_reboot ( unsigned cmd)

Carries out a reboot() command.

Before restarting, halting or powering off, the disks' caches are written out.

Parameters
cmdRB_AUTOBOOT, RB_HALT_SYSTEM, RB_POWER_OFF, RB_ENABLE_CAD or RB_DISABLE_CAD
Returns
0 for RB_ENABLE_CAD and RB_DISABLE_CAD, or -EINVAL for an unknown command; the others don't return

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().