summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-26 16:43:21 -0400
committerIan Moffett <ian@osmora.org>2024-04-26 16:44:42 -0400
commitb2978f087f2df226dc877d3c881d1e0df2fbfd41 (patch)
treeef181592c86fbe8313f9378b94dfa2638ef3e8a9 /sys/kern
parent6a6717b1e4f3f85a09fa48ee11e5421771995493 (diff)
kernel: sched: Move sys_exit() from kern_syscall.c
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sched.c7
-rw-r--r--sys/kern/kern_syscall.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c
index 1b4c987..c073224 100644
--- a/sys/kern/kern_sched.c
+++ b/sys/kern/kern_sched.c
@@ -457,6 +457,13 @@ sched_context_switch(struct trapframe *tf)
sched_oneshot(false);
}
+uint64_t
+sys_exit(struct syscall_args *args)
+{
+ sched_exit();
+ __builtin_unreachable();
+}
+
void
sched_init(void)
{
diff --git a/sys/kern/kern_syscall.c b/sys/kern/kern_syscall.c
index e892c39..b575346 100644
--- a/sys/kern/kern_syscall.c
+++ b/sys/kern/kern_syscall.c
@@ -35,13 +35,6 @@
#include <sys/system.h>
#include <vm/map.h>
-__noreturn static uint64_t
-sys_exit(struct syscall_args *args)
-{
- sched_exit();
- __builtin_unreachable();
-}
-
uint64_t(*g_syscall_table[__MAX_SYSCALLS])(struct syscall_args *args) = {
sys_exit,
sys_write,