. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / posix / _getppid.c
blob7cc5c574c0bae45be140303845cfd0a567007526
1 #include <lib.h>
2 #define getppid _getppid
3 #include <unistd.h>
5 PUBLIC pid_t getppid()
7 message m;
9 /* POSIX says that this function is always successful and that no
10 * return value is reserved to indicate an error. Minix syscalls
11 * are not always successful and Minix returns the reserved value
12 * (pid_t) -1 when there is an error.
14 if (_syscall(MM, GETPID, &m) < 0) return ( (pid_t) -1);
15 return( (pid_t) m.m2_i1);