diff options
author | Danny Holman <dholman@gymli.org> | 2022-01-21 12:10:05 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2022-01-21 12:10:05 -0600 |
commit | 8cd22309667cf3da9c357e5b7dca43e8b6a2f9c0 (patch) | |
tree | 05a7e450a702a5fc744b4bd1f96abf1952ece566 /arch/i386/boot/syscall.c | |
parent | 5fe27abd6204dd17787d7d0046015777444357ff (diff) |
arch: i386: move non-critial files out of boot
Move all files not needed for the bootstrap process out of boot and into
the main x86 source directory.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot/syscall.c')
-rw-r--r-- | arch/i386/boot/syscall.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/i386/boot/syscall.c b/arch/i386/boot/syscall.c deleted file mode 100644 index fb613b3..0000000 --- a/arch/i386/boot/syscall.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "syscall.h" -#include <kernel/io.h> -#include <stddef.h> - -void *(*syscall_handlers[30])(struct isr_frame *frame); - -void syscall_dispatch(struct isr_frame *frame) { - if (syscall_handlers[frame->eax] != NULL) - syscall_handlers[frame->eax](frame); - else - kprintf("Error: Invalid system call number: %d\n", frame->eax); - __asm__ volatile("cli;hlt"); -} - -void register_syscall(void *handler(struct isr_frame*), int num) { - syscall_handlers[num] = handler; -} - -void print_hello(struct isr_frame *frame) { - kprintf("Hello syscall\n"); -} |