PKUOS - Pintos
Pintos source browser for PKU Operating System course
shutdown.h
Go to the documentation of this file.
1#ifndef DEVICES_SHUTDOWN_H
2#define DEVICES_SHUTDOWN_H
3
4#include <debug.h>
5
6/** How to shut down when Pintos has nothing left to do. */
8 {
9 SHUTDOWN_NONE, /**< Loop forever. */
10 SHUTDOWN_POWER_OFF, /**< Power off the machine (if possible). */
11 SHUTDOWN_REBOOT, /**< Reboot the machine (if possible). */
12 };
13
14void shutdown (void);
16void shutdown_reboot (void) NO_RETURN;
18
19#endif /**< devices/shutdown.h */
#define NO_RETURN
Definition: debug.h:8
void shutdown(void)
Shuts down the machine in the way configured by shutdown_configure().
Definition: shutdown.c:29
void shutdown_configure(enum shutdown_type)
Sets TYPE as the way that machine will shut down when Pintos execution is complete.
Definition: shutdown.c:50
shutdown_type
How to shut down when Pintos has nothing left to do.
Definition: shutdown.h:8
@ SHUTDOWN_POWER_OFF
Power off the machine (if possible).
Definition: shutdown.h:10
@ SHUTDOWN_NONE
Loop forever.
Definition: shutdown.h:9
@ SHUTDOWN_REBOOT
Reboot the machine (if possible).
Definition: shutdown.h:11
void shutdown_power_off(void) NO_RETURN
devices/shutdown.h
Definition: shutdown.c:88
void shutdown_reboot(void) NO_RETURN
Reboots the machine via the keyboard controller.
Definition: shutdown.c:57