diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-15 21:40:41 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-15 21:40:41 +0200 |
commit | 3cba2a8a7872794516488ac5dfe240e946b1288d (patch) | |
tree | abf359c90dbee15228f34669c7d5613d111e77f0 /LibC | |
parent | dcf490ecab4fea2eb2cb80508ae68d77c328739d (diff) | |
download | serenity-3cba2a8a7872794516488ac5dfe240e946b1288d.zip |
Kernel: Add a beep() syscall that beeps the PC speaker.
Hook this up in Terminal so that the '\a' character generates a beep.
Finally emit an '\a' character in the shell line editing code when
backspacing at the start of the line.
Diffstat (limited to 'LibC')
-rw-r--r-- | LibC/unistd.cpp | 5 | ||||
-rw-r--r-- | LibC/unistd.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp index e07463d9bf..baa99bbd5d 100644 --- a/LibC/unistd.cpp +++ b/LibC/unistd.cpp @@ -475,4 +475,9 @@ int donate(int tid) __RETURN_WITH_ERRNO(rc, rc, -1); } +void beep() +{ + syscall(SC_beep); +} + } diff --git a/LibC/unistd.h b/LibC/unistd.h index 172cbcd8a1..b184a5a435 100644 --- a/LibC/unistd.h +++ b/LibC/unistd.h @@ -14,6 +14,7 @@ __BEGIN_DECLS extern char** environ; +void beep(); int systrace(pid_t); int gettid(); int donate(int tid); |