diff options
Diffstat (limited to 'src/init/main.c')
-rw-r--r-- | src/init/main.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/init/main.c b/src/init/main.c index c32ac01..5615980 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -1,28 +1,14 @@ #include <kernel/syscalls.h> -#include <stddef.h> -#include <stdint.h> - -int _syscall(int, int, int, int); - -_Noreturn void exit(const char *msg, size_t len) { - _syscall(SC_EXIT, (int)msg, len, 0); - __builtin_unreachable(); -} - -int debuglog(const char *msg, size_t len) { - return _syscall(SC_DEBUGLOG, (int)msg, len, 0); -} - int main() { - debuglog("hello from init! ", - sizeof("hello from init! ") - 1); + _syscall_debuglog("hello from init! ", + sizeof("hello from init! ") - 1); - _syscall(SC_FORK, 0, 0, 0); + _syscall_fork(); - debuglog("i got forked. ", - sizeof("i got forked. ") - 1); + _syscall_debuglog("i got forked. ", + sizeof("i got forked. ") - 1); - exit( "bye from init! ", - sizeof("bye from init! ") - 1); + _syscall_exit("bye from init! ", + sizeof("bye from init! ") - 1); } |