syscall: add basic syscall entry
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
1b8fe6b24d
commit
c01b1d7eee
12 changed files with 154 additions and 15 deletions
|
|
@ -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
14
kernel/syscall.c
Normal 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];
|
||||
}
|
||||
Loading…
Reference in a new issue