diff options
author | Jesse <jesse.buhagiar@student.rmit.edu.au> | 2019-07-19 17:58:12 +1000 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-19 09:58:12 +0200 |
commit | a27c9e3e01afbebb7f9edcfd45eeee87047ba632 (patch) | |
tree | 57de4c9ea18a2b065bc2e7d591f3b9eae6c8f02a /Libraries/LibC/unistd.h | |
parent | 23d45532fc383204413b4de5c793791cb07a51da (diff) | |
download | serenity-a27c9e3e01afbebb7f9edcfd45eeee87047ba632.zip |
Kernel+Userland: Addd reboot syscall (#334)
Rolling with the theme of adding a dialog to shutdown the machine, it is
probably nice to have a way to reboot the machine without performing a full
system powerdown.
A reboot program has been added to `/bin/` as well as a corresponding
`syscall` (SC_reboot). This syscall works by attempting to pulse the 8042
keyboard controller. Note that this is NOT supported on new machines, and
should only be a fallback until we have proper ACPI support.
The implementation causes a triple fault in QEMU, which then restarts the
system. The filesystems are locked and synchronized before this occurs,
so there shouldn't be any corruption etctera.
Diffstat (limited to 'Libraries/LibC/unistd.h')
-rw-r--r-- | Libraries/LibC/unistd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h index 806efbebe0..a84353dc5a 100644 --- a/Libraries/LibC/unistd.h +++ b/Libraries/LibC/unistd.h @@ -93,6 +93,7 @@ char* getlogin(); int chown(const char* pathname, uid_t, gid_t); int fchown(int fd, uid_t, gid_t); int ftruncate(int fd, off_t length); +int reboot(); enum { _PC_NAME_MAX, |