feat: wrapper function for bootstraping user program
[lunaix-os.git] / lunaix-os / usr / includes / sys / types.h
1 #ifndef __LUNAIX_SYS_TYPES_H
2 #define __LUNAIX_SYS_TYPES_H
3
4 #define PEXITTERM 0x100
5 #define PEXITSTOP 0x200
6 #define PEXITSIG 0x400
7
8 #define PEXITNUM(flag, code) (flag | (code & 0xff))
9
10 #define WNOHANG 1
11 #define WUNTRACED 2
12 #define WEXITSTATUS(wstatus) ((wstatus & 0xff))
13 #define WIFSTOPPED(wstatus) ((wstatus & PEXITSTOP))
14 #define WIFEXITED(wstatus)                                                     \
15     ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
16
17 #define WIFSIGNALED(wstatus) ((wstatus & PEXITSIG))
18
19 typedef signed long ssize_t;
20
21 typedef int pid_t;
22
23 typedef unsigned long size_t;
24
25 typedef unsigned long off_t;
26
27 #endif /* __LUNAIX_TYPES_H */