toaruos/libc/unistd/getpid.c

16 lines
227 B
C
Raw Normal View History

#include <unistd.h>
2018-06-25 10:28:13 +03:00
#include <errno.h>
#include <syscall.h>
2018-06-25 10:28:13 +03:00
#include <syscall_nums.h>
2018-06-25 10:28:13 +03:00
DEFN_SYSCALL0(getpid, SYS_GETPID);
pid_t getpid(void) {
return syscall_getpid();
}
2018-06-25 10:28:13 +03:00
pid_t getppid(void) {
errno = ENOTSUP;
return -1;
}