Implemented stdlib.h

This commit is contained in:
2024-10-25 12:01:54 +02:00
parent a797d4366a
commit 18d1b7de6a
8 changed files with 156 additions and 24 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <stdlib.h>
#include <syscall.h>
// Exits without cleaning up
void _Exit(int status) {
syscall(SYS_EXIT, status, 0, 0);
}
void exit(int status) {
// TODO: Close open files
// TODO: Free malloced buffers
_Exit(status);
}