diff options
author | Marvin Borner | 2019-12-10 21:47:41 +0100 |
---|---|---|
committer | Marvin Borner | 2019-12-10 21:47:41 +0100 |
commit | 68915f46e66ed65ce2d32009fdfa2f5dca116842 (patch) | |
tree | 7d6df3e4dc6219422cc4b1faf909ff32a74b6edf /src/kernel/syscall/syscall.c | |
parent | 33bdf18dad2539aca21727e95e04bfedecd37a76 (diff) |
Some syscalls and userspace stuff
sorry for the worse-getting commit messages...
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r-- | src/kernel/syscall/syscall.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 89b70eb..3a1b011 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -2,14 +2,19 @@ #include <kernel/syscall/syscall.h> #include <kernel/interrupts/interrupts.h> #include <kernel/io/io.h> +#include <kernel/paging/paging.h> +#include <kernel/system.h> typedef uint32_t (*syscall_func)(unsigned int, ...); uint32_t (*syscalls[])() = { + [0] = (uint32_t (*)()) halt_loop, // DEBUG! [1] = sys_write, [2] = sys_read, - [3] = (uint32_t (*)()) sys_writec, - [4] = sys_readc + [3] = sys_writec, + [4] = sys_readc, + [5] = sys_paging_alloc, + [6] = sys_paging_free }; void syscall_handler(struct regs *r) |