stdlib.h (405B)
1 #ifndef TA_STDLIB_H
2 #define TA_STDLIB_H
3
4 #include <tuxanci2/syscall.h>
5 #include <tuxanci2/abi.h>
6 #include <stdint.h>
7 #include <stddef.h>
8
9 void *malloc(size_t size);
10 void *calloc(size_t count, size_t size);
11 void *realloc(void *ptr, size_t size);
12 void free(void *ptr);
13
14 static inline void exit(int status) {
15 ta_syscall(TA_SYS_EXIT, (uint32_t)status, 0, 0, 0, 0, 0);
16
17 while (1) {}
18 }
19
20 #endif // TA_STDLIB_H