summaryrefslogtreecommitdiff
path: root/src/user/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib')
-rw-r--r--src/user/lib/syscall.c8
-rw-r--r--src/user/lib/unistd.c4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/user/lib/syscall.c b/src/user/lib/syscall.c
index f7eaddb..3e8473c 100644
--- a/src/user/lib/syscall.c
+++ b/src/user/lib/syscall.c
@@ -82,6 +82,14 @@ void _sys_intr_set(void __user *ip) {
return (void)_syscall(_SYS_INTR_SET, (long)ip, 0, 0, 0, 0);
}
+uint32_t _sys_getpid(void) {
+ return (uint32_t)_syscall(_SYS_GETPID, 0, 0, 0, 0, 0);
+}
+
+uint32_t _sys_getppid(void) {
+ return (uint32_t)_syscall(_SYS_GETPPID, 0, 0, 0, 0, 0);
+}
+
long _sys_execbuf(void __user *buf, size_t len) {
return _syscall(_SYS_EXECBUF, (long)buf, (long)len, 0, 0, 0);
}
diff --git a/src/user/lib/unistd.c b/src/user/lib/unistd.c
index 28164e6..d6f24f8 100644
--- a/src/user/lib/unistd.c
+++ b/src/user/lib/unistd.c
@@ -185,11 +185,11 @@ pid_t getpgrp(void) {
}
pid_t getpid(void) {
- __libc_panic("unimplemented");
+ return _sys_getpid();
}
pid_t getppid(void) {
- __libc_panic("unimplemented");
+ return _sys_getppid();
}
int getgroups(int size, gid_t list[]) {