From d94ffac4a584dc7a4f6f2ec567b8caab05ce9253 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 6 May 2020 19:04:05 +0200 Subject: New build parameters and shared includes This changes many files but I've just applied some replace commands.. So - nothing special! --- src/kernel/syscall/syscall.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'src/kernel/syscall/syscall.c') diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 53f94cd..92c0dbe 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -1,22 +1,23 @@ #include -#include -#include -#include -#include -#include -#include - -typedef uint32_t (*syscall_func)(uint32_t, ...); - -uint32_t (*syscalls[])() = { [0] = (uint32_t(*)())halt_loop, // DEBUG! - [1] = sys_exit, - [2] = sys_fork, - [3] = sys_read, - [4] = sys_write, - [5] = sys_exec, - [6] = sys_get_pid, - [7] = sys_malloc, - [8] = sys_free }; +#include +#include +#include +#include +#include +#include +#include + +typedef u32 (*syscall_func)(u32, ...); + +u32 (*syscalls[])() = { [SYS_HALT] = (u32(*)())halt_loop, // DEBUG! + [SYS_EXIT] = sys_exit, + [SYS_FORK] = sys_fork, + [SYS_READ] = sys_read, + [SYS_WRITE] = sys_write, + [SYS_EXEC] = sys_exec, + [SYS_GET_PID] = sys_get_pid, + [SYS_MALLOC] = sys_malloc, + [SYS_FREE] = sys_free }; void syscall_handler(struct regs *r) { -- cgit v1.2.3