From e56a5a519b157f62a2236c6395b45fc2d4ac7b66 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 31 Jul 2021 14:54:09 +0200 Subject: change the syscall naming convention; same one in kernel and userland --- src/init/syscalls.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/init/syscalls.c (limited to 'src/init/syscalls.c') diff --git a/src/init/syscalls.c b/src/init/syscalls.c new file mode 100644 index 0000000..d0da33e --- /dev/null +++ b/src/init/syscalls.c @@ -0,0 +1,17 @@ +// this file could probably just get generated by a script +#include + +int _syscall(int, int, int, int); + +_Noreturn void _syscall_exit(const char *msg, size_t len) { + _syscall(_SYSCALL_EXIT, (int)msg, len, 0); + __builtin_unreachable(); +} + +int _syscall_fork() { + return _syscall(_SYSCALL_FORK, 0, 0, 0); +} + +int _syscall_debuglog(const char *msg, size_t len) { + return _syscall(_SYSCALL_DEBUGLOG, (int)msg, len, 0); +} -- cgit v1.2.3