summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/syscall.c
blob: e8b69a2c45adb293a4ef084436fb1559ec13f09a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <kernel/syscall.h>
#include <kernel/panic.h>
#include <libk/string.h>
#include <libk/io.h>
#include <stddef.h>

void sys_read(struct isr_frame *frame) {
}

void sys_write(struct isr_frame *frame) {
}

int handle_syscall(struct isr_frame *frame) {
        switch (frame->eax) {
                case SYS_READ:
                        sys_read(frame);
                        break;
                case SYS_WRITE:
                        sys_write(frame);
                        break;
                default:
                        panic("Invalid system call number");
        }
        return 0;
}