syscall: add basic syscall entry

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-15 16:36:38 -04:00
commit c01b1d7eee
12 changed files with 154 additions and 15 deletions

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += device.o
obj-y += sg.o
obj-y += syscall.o
obj-y += block/
obj-y += proc/
obj-y += tty/

14
kernel/syscall.c Normal file
View file

@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <kernel/common.h>
#include <kernel/types.h>
#include <kernel/syscall.h>
syscall_t syscalls[512] = {0};
syscall_t get_syscall(u64 no)
{
if (no >= ARRAY_SIZE(syscalls))
return NULL;
return syscalls[no];
}