renamed and cleaned up export header files to match linux convention
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / wait.h
1 #ifndef _LUNAIX_UHDR_WAIT_H
2 #define _LUNAIX_UHDR_WAIT_H
3
4 #define PEXITTERM   0x100
5 #define PEXITSTOP   0x200
6 #define PEXITSIG    0x400
7
8 #define WNOHANG     1
9 #define WUNTRACED   2
10
11 #define PEXITNUM(flag, code)    (flag | (code & 0xff))
12 #define WEXITSTATUS(wstatus)    ((wstatus & 0xff))
13 #define WIFSTOPPED(wstatus)     ((wstatus & PEXITSTOP))
14 #define WIFSIGNALED(wstatus)    ((wstatus & PEXITSIG))
15
16 #define WIFEXITED(wstatus)                                                     \
17     ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
18
19 #endif /* _LUNAIX_UHDR_WAIT_H */