build system refresh
This commit is contained in:
46
rlibc/include/syscall.h
Normal file
46
rlibc/include/syscall.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef RLIBC_SYSCALL_H
|
||||
#define RLIBC_SYSCALL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define SYS_EXIT 1
|
||||
#define SYS_READ 3
|
||||
#define SYS_WRITE 4
|
||||
#define SYS_OPEN 5
|
||||
#define SYS_CLOSE 6
|
||||
#define SYS_BRK 12
|
||||
#define SYS_SBRK 13
|
||||
#define SYS_PTY 20
|
||||
#define SYS_FORK 21
|
||||
#define SYS_EXEC 22
|
||||
#define SYS_DUP2 23
|
||||
#define SYS_LSEEK 24
|
||||
#define SYS_WAIT 25
|
||||
#define SYS_MMAP 26
|
||||
#define SYS_IOCTL 27
|
||||
|
||||
int open(const char* path);
|
||||
int write(int fd, const void *buf, size_t count);
|
||||
int read(int fd, void *buf, size_t count);
|
||||
int close(int fd);
|
||||
|
||||
int lseek(int fd, size_t offset, int whence);
|
||||
|
||||
void* mmap(int fd);
|
||||
|
||||
void exit(int status) __attribute__((noreturn));
|
||||
|
||||
void* sbrk(int32_t increment);
|
||||
int brk(void *addr);
|
||||
|
||||
int pty(int* slave);
|
||||
|
||||
int fork();
|
||||
int exec(const char* path);
|
||||
int dup2(int src, int dst);
|
||||
int waitpid(int pid, int* status);
|
||||
|
||||
int ioctl(int fd, uint32_t request, void* arg);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user