diff options
author | dzwdz | 2021-07-26 16:40:35 +0200 |
---|---|---|
committer | dzwdz | 2021-07-26 16:40:35 +0200 |
commit | bfe381768bf9fde9595a7fdacfb8037458fc0f6a (patch) | |
tree | a85952aac5fc56b53c31968eaa8d9c43c7f9b4a1 | |
parent | 875083ce040a42fa981e46fa9d532ebfe52fb2f4 (diff) |
mark sc_exit() as noreturn
gets rid of the double panic() call
-rw-r--r-- | src/kernel/syscalls.c | 5 |
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: |