Get rid of power_off_when_done global variable.
[pintos-anon] / src / devices / shutdown.h
index 0bc5657b4b8716978827bc513ef9aead9bc1e97e..dc4f942384d44f210469b83b4b412799bb86213f 100644 (file)
@@ -1,7 +1,19 @@
 #ifndef DEVICES_SHUTDOWN_H
 #define DEVICES_SHUTDOWN_H
 
-void shutdown_reboot (void);
-void shutdown_power_off (void);
+#include <debug.h>
+
+/* How to shut down when Pintos has nothing left to do. */
+enum shutdown_type
+  {
+    SHUTDOWN_NONE,              /* Loop forever. */
+    SHUTDOWN_POWER_OFF,         /* Power off the machine (if possible). */
+    SHUTDOWN_REBOOT,            /* Reboot the machine (if possible). */
+  };
+
+void shutdown (void);
+void shutdown_configure (enum shutdown_type);
+void shutdown_reboot (void) NO_RETURN;
+void shutdown_power_off (void) NO_RETURN;
 
 #endif /* devices/shutdown.h */