From e22e493940266e0aa9be2bf58df1821a3539e19b Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 15 Nov 2023 02:44:45 +0100 Subject: Kernel/LibC: Add chdir function and syscall --- kernel/cpu/syscall.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'kernel/cpu/syscall.c') diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index 024d06f..31fa055 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -22,8 +23,8 @@ #include #include #include -#include #include +#include #pragma GCC diagnostic ignored "-Wpedantic" @@ -167,11 +168,11 @@ void (*syscall_functions[])() = { (void(*))syscall_msleep, (void(*))syscall_uptime, (void(*))syscall_mkdir, (void(*))syscall_recvfrom, (void(*))syscall_sendto, (void(*))syscall_kill, - (void(*))syscall_sigaction, + (void(*))syscall_sigaction, (void(*))syscall_chdir, }; -void syscall_function_handler(u32 eax, u32 arg1, u32 arg2, - u32 arg3, u32 arg4, u32 arg5) { +void syscall_function_handler(u32 eax, u32 arg1, u32 arg2, u32 arg3, u32 arg4, + u32 arg5) { assert(eax < sizeof(syscall_functions) / sizeof(syscall_functions[0])); syscall_functions[eax](arg1, arg2, arg3, arg4, arg5); } -- cgit v1.2.3