Luna/kernel/src/sys/id.cpp
apio e76ccd6c4c
All checks were successful
continuous-integration/drone/push Build is passing
kernel+libc+init: Add getppid() and wait()
2023-03-24 17:39:55 +01:00

13 lines
243 B
C++

#include "sys/Syscall.h"
#include "thread/Scheduler.h"
Result<u64> sys_getpid(Registers*, SyscallArgs)
{
return Scheduler::current()->id;
}
Result<u64> sys_getppid(Registers*, SyscallArgs)
{
return Scheduler::current()->parent_id;
}