CS318 - Pintos
Pintos source browser for JHU CS318 course
src
devices
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. */
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 */
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
Generated on Thu Aug 22 2019 10:19:15 for CS318 - Pintos by
1.8.16