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