Usermode/libc - Fix strchr and strrchr behavior
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / sys / wait.h
1 /*
2  * Acess2 POSIX Emulation
3  * - By John Hodge (thePowersGang)
4  *
5  * sys/wait.h
6  * - Waiting
7  */
8 #ifndef _LIBPOSIX__SYS__WAIT_H_
9 #define _LIBPOSIX__SYS__WAIT_H_
10
11 #include <sys/types.h>
12
13 // POSIX, waitpid()
14 #define WNOHANG 0x01
15 #define WUNTRACED       0x02
16
17 // POSIX, status values
18 #define WIFEXITED(v)    (((v)>>16)==0)
19 #define WEXITSTATUS(v)  (v&0xFF)
20 #define WIFSIGNALED(v)  (((v)>>16)==1)
21 #define WTERMSIG(v)     (v&0xFFF)
22 #define WCOREDUMP(v)    (!!(v>>12))
23 #define WIFSTOPPED(v)   0
24 #define WSTOPSIG(v)     0
25 #define WIFCONTINUED(v) 0
26
27 // POSIX/XSI, waitid(options)
28 #define WEXITED         0x10
29 #define WSTOPPED        0x20
30 #define WCONTINUED      0x40
31 #define WNOWAIT         0x80
32
33 // POSIX/XSI, idtype_t
34 typedef enum
35 {
36         P_ALL,
37         P_PID,
38         P_PGID
39 } idtype_t;
40
41 // POSIX
42 extern pid_t    wait(int *status);
43 // POSIX/XSI
44 //extern int    waitid(idtype_t, id_t, siginfo_t *, int);
45 // POSIX
46 extern pid_t    waitpid(pid_t pid, int *status, int options);
47
48
49 #endif
50

UCC git Repository :: git.ucc.asn.au