PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
#include <debug.h>
Go to the source code of this file.
Enumerations | |
enum | shutdown_type { SHUTDOWN_NONE , SHUTDOWN_POWER_OFF , SHUTDOWN_REBOOT } |
How to shut down when Pintos has nothing left to do. More... | |
Functions | |
void | shutdown (void) |
Shuts down the machine in the way configured by shutdown_configure(). More... | |
void | shutdown_configure (enum shutdown_type) |
Sets TYPE as the way that machine will shut down when Pintos execution is complete. More... | |
void | shutdown_reboot (void) NO_RETURN |
Reboots the machine via the keyboard controller. More... | |
void | shutdown_power_off (void) NO_RETURN |
devices/shutdown.h More... | |
enum shutdown_type |
How to shut down when Pintos has nothing left to do.
Enumerator | |
---|---|
SHUTDOWN_NONE | Loop forever. |
SHUTDOWN_POWER_OFF | Power off the machine (if possible). |
SHUTDOWN_REBOOT | Reboot the machine (if possible). |
Definition at line 7 of file shutdown.h.
void shutdown | ( | void | ) |
Shuts down the machine in the way configured by shutdown_configure().
If the shutdown type is SHUTDOWN_NONE (which is the default), returns without doing anything.
Definition at line 29 of file shutdown.c.
References how, shutdown_power_off(), SHUTDOWN_POWER_OFF, shutdown_reboot(), and SHUTDOWN_REBOOT.
Referenced by debug_panic(), and pintos_init().
void shutdown_configure | ( | enum | shutdown_type | ) |
Sets TYPE as the way that machine will shut down when Pintos execution is complete.
Definition at line 50 of file shutdown.c.
References how.
Referenced by parse_options().
void shutdown_power_off | ( | void | ) |
Definition at line 88 of file shutdown.c.
References filesys_done(), outb(), outw(), print_stats(), printf(), s, and serial_flush().
Referenced by shutdown(), and usage().
void shutdown_reboot | ( | void | ) |
Reboots the machine via the keyboard controller.
Definition at line 57 of file shutdown.c.
References CONTROL_REG, inb(), outb(), printf(), and timer_udelay().
Referenced by keyboard_interrupt(), and shutdown().