summaryrefslogtreecommitdiff
path: root/src/init/syscalls.c
blob: d0da33e44bd6a75a0f10d803734e573efc0e35f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// this file could probably just get generated by a script
#include <kernel/syscalls.h>

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);
}