diff options
Diffstat (limited to 'pintos-progos/devices/shutdown.h')
| -rw-r--r-- | pintos-progos/devices/shutdown.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pintos-progos/devices/shutdown.h b/pintos-progos/devices/shutdown.h new file mode 100644 index 0000000..dc4f942 --- /dev/null +++ b/pintos-progos/devices/shutdown.h | |||
| @@ -0,0 +1,19 @@ | |||
| 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. */ | ||
| 7 | enum shutdown_type | ||
| 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); | ||
| 15 | void shutdown_configure (enum shutdown_type); | ||
| 16 | void shutdown_reboot (void) NO_RETURN; | ||
| 17 | void shutdown_power_off (void) NO_RETURN; | ||
| 18 | |||
| 19 | #endif /* devices/shutdown.h */ | ||
