summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authordzwdz2021-07-26 16:40:35 +0200
committerdzwdz2021-07-26 16:40:35 +0200
commitbfe381768bf9fde9595a7fdacfb8037458fc0f6a (patch)
treea85952aac5fc56b53c31968eaa8d9c43c7f9b4a1 /src/kernel
parent875083ce040a42fa981e46fa9d532ebfe52fb2f4 (diff)
mark sc_exit() as noreturn
gets rid of the double panic() call
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/syscalls.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 27e835d..a6a2b17 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -4,9 +4,7 @@
#include <kernel/syscalls.h>
#include <stdint.h>
-int sc_exit(const char *msg, size_t len) {
- // the message is currently ignored
-
+_Noreturn void sc_exit(const char *msg, size_t len) {
log_const("last process returned. ");
panic();
}
@@ -29,7 +27,6 @@ int syscall_handler(int num, int a, int b, int c) {
switch (num) {
case SC_EXIT:
sc_exit((void*)a, b);
- panic(); // sc_exit should never return
case SC_DEBUGLOG:
return sc_debuglog((void*)a, b);
default: