8 #include <klibc/extern.h>
10 #include <sys/resource.h>
12 #include <linux/wait.h>
14 #define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
15 #define WTERMSIG(s) ((s) & 0x7f)
16 #define WIFEXITED(s) (WTERMSIG(s) == 0)
17 #define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f)
18 /* Ugly hack to avoid multiple evaluation of "s" */
19 #define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2)
20 #define WCOREDUMP(s) ((s) & 0x80)
21 #define WSTOPSIG(s) WEXITSTATUS(s)
23 __extern pid_t wait(int *);
24 __extern pid_t waitpid(pid_t, int *, int);
25 __extern pid_t wait3(int *, int, struct rusage *);
26 __extern pid_t wait4(pid_t, int *, int, struct rusage *);
28 #endif /* _SYS_WAIT_H */