hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/sysroot/usr/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'sysroot/usr/lib/libc')
-rw-r--r--sysroot/usr/lib/libc/syscalls.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysroot/usr/lib/libc/syscalls.c b/sysroot/usr/lib/libc/syscalls.c
index ad959b9..33bbb12 100644
--- a/sysroot/usr/lib/libc/syscalls.c
+++ b/sysroot/usr/lib/libc/syscalls.c
@@ -36,3 +36,23 @@ int brk(void* address)
{
return (int)__syscall1(SYS_brk, (long)address);
}
+
+int fork(void)
+{
+ return (int)__syscall0(SYS_fork);
+}
+
+int exec(const char* path, const char* arg)
+{
+ return (int)__syscall2(SYS_exec, (long)path, (long)arg);
+}
+
+int wait(int* status)
+{
+ return (int)__syscall1(SYS_wait, (long)status);
+}
+
+int getpid(void)
+{
+ return (int)__syscall0(SYS_getpid);
+}