diff --git a/sys/include/wait.h b/sys/include/wait.h new file mode 100644 index 0000000..8c1c6bf --- /dev/null +++ b/sys/include/wait.h @@ -0,0 +1,20 @@ + +#ifndef __SYS_WAIT_H__ +#define __SYS_WAIT_H__ + +#include + +/* Extract the status code from the process */ +#define WEXITSTATUS(_x) (_x & 0x000000ff) +#define WGETPID(_x) ((pid_t)(_x >> 16)) + +/* Flags to waitpid */ +#define WAIT_ANY 0 + +#ifndef _KERNEL +pid_t wait(int *status); +pid_t waitpid(pid_t pid, int *status, int options); +#endif + +#endif /* __SYS_WAIT_H__ */ +