diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/kjarna/syscall.h | 12 | ||||
| -rw-r--r-- | api/posix/unistd.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/api/kjarna/syscall.h b/api/kjarna/syscall.h new file mode 100644 index 0000000..8af162a --- /dev/null +++ b/api/kjarna/syscall.h @@ -0,0 +1,12 @@ +#define SYS_NOOP 0 +#define SYS_OPEN 1 +#define SYS_CLOSE 2 +#define SYS_LSEEK 3 +#define SYS_READ 4 +#define SYS_WRITE 5 +#define SYS_MMAP 6 +#define SYS_MUNMAP 7 +#define SYS_EXIT 8 + +#define NR_SYSCALLS (SYS_EXIT + 1) + diff --git a/api/posix/unistd.h b/api/posix/unistd.h index 4964689..6139660 100644 --- a/api/posix/unistd.h +++ b/api/posix/unistd.h @@ -2,6 +2,7 @@ #include <stddef.h> #include "sys/types.h" +#include <stdnoreturn.h> #define STDIN_FILENO 0 #define STDOUT_FILENO 1 @@ -18,4 +19,5 @@ ssize_t read(int fd, void *buf, size_t length); ssize_t write(int fd, const void *buf, size_t length); off_t lseek(int fd, off_t position, int whence); int close(int fd); +noreturn void _exit(int status); |
