CS318 - Pintos
Pintos source browser for JHU CS318 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 
14 void shutdown (void);
16 void shutdown_reboot (void) NO_RETURN;
17 void shutdown_power_off (void) NO_RETURN;
18 
19 #endif /**< devices/shutdown.h */
NO_RETURN
#define NO_RETURN
Definition: debug.h:8
SHUTDOWN_NONE
Loop forever.
Definition: shutdown.h:9
shutdown_power_off
void shutdown_power_off(void) NO_RETURN
devices/shutdown.h
Definition: shutdown.c:88
shutdown_type
shutdown_type
How to shut down when Pintos has nothing left to do.
Definition: shutdown.h:7
shutdown
void shutdown(void)
Shuts down the machine in the way configured by shutdown_configure().
Definition: shutdown.c:29
shutdown_configure
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_POWER_OFF
Power off the machine (if possible).
Definition: shutdown.h:10
SHUTDOWN_REBOOT
Reboot the machine (if possible).
Definition: shutdown.h:11
shutdown_reboot
void shutdown_reboot(void) NO_RETURN
Reboots the machine via the keyboard controller.
Definition: shutdown.c:57
debug.h