summaryrefslogtreecommitdiff
path: root/src/init/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/init/syscalls.c')
-rw-r--r--src/init/syscalls.c17
1 files changed, 17 insertions, 0 deletions
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 <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);
+}