VM: simplify slab allocator
[minix.git] / lib / libc / gen / minix / waitpid.c
blob6972e6820b7c07715c1742da3d6422c67a932445
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <sys/wait.h>
7 #ifdef __weak_alias
8 __weak_alias(waitpid, _waitpid)
9 #endif
11 pid_t waitpid(pid, status, options)
12 pid_t pid;
13 int *status;
14 int options;
16 message m;
18 m.m1_i1 = pid;
19 m.m1_i2 = options;
20 if (_syscall(PM_PROC_NR, WAITPID, &m) < 0) return(-1);
21 if (status != 0) *status = m.m2_i1;
22 return m.m_type;