diff options
Diffstat (limited to 'sysroot/usr/include')
| -rw-r--r-- | sysroot/usr/include/sys/syscall.h | 15 | ||||
| -rw-r--r-- | sysroot/usr/include/unistd.h | 5 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sysroot/usr/include/sys/syscall.h b/sysroot/usr/include/sys/syscall.h index 4a23a53..eecd257 100644 --- a/sysroot/usr/include/sys/syscall.h +++ b/sysroot/usr/include/sys/syscall.h @@ -7,8 +7,19 @@ #define SYS_open 7 #define SYS_close 8 #define SYS_lseek 9 -#define SYS_brk 10 -#define SYS_sbrk 11 +#define SYS_brk 10 +#define SYS_sbrk 11 +#define SYS_fork 12 +#define SYS_exec 13 +#define SYS_wait 14 +#define SYS_getpid 15 + +static inline long __syscall0(long number) +{ + long result; + __asm__ volatile("int $0x80" : "=a"(result) : "a"(number) : "memory"); + return result; +} static inline long __syscall1(long number, long a1) { diff --git a/sysroot/usr/include/unistd.h b/sysroot/usr/include/unistd.h index f5a67ab..65414d5 100644 --- a/sysroot/usr/include/unistd.h +++ b/sysroot/usr/include/unistd.h @@ -15,4 +15,9 @@ long lseek(int fd, long offset, int whence); void* sbrk(long increment); int brk(void* address); +int fork(void); +int exec(const char* path, const char* arg); +int wait(int* status); +int getpid(void); + #endif |
