diff options
Diffstat (limited to 'src/kernel/syscall/syscall.c')
-rw-r--r-- | src/kernel/syscall/syscall.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index f883f2e..a106f07 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -3,20 +3,19 @@ #include <kernel/interrupts/interrupts.h> #include <kernel/system.h> #include <kernel/lib/stdio.h> +#include <kernel/io/io.h> -typedef uint32_t (*syscall_func)(unsigned int, ...); +typedef uint32_t (*syscall_func)(uint32_t, ...); uint32_t (*syscalls[])() = { [0] = (uint32_t(*)())halt_loop, // DEBUG! - [1] = sys_write, - [2] = sys_read, - [3] = (uint32_t(*)())sys_writec, - [4] = sys_readc, - [5] = sys_get_pointers, - [6] = sys_alloc, - [7] = sys_free }; + [1] = sys_putch, + [2] = sys_getch, + [3] = sys_malloc, + [4] = sys_free }; void syscall_handler(struct regs *r) { + sti(); log("Received syscall!"); if (r->eax >= sizeof(syscalls) / sizeof(*syscalls)) @@ -35,4 +34,4 @@ void syscall_handler(struct regs *r) void syscalls_install() { isr_install_handler(0x80, syscall_handler); -} +}
\ No newline at end of file |