fix: incorrect settings of msi registers.
[lunaix-os.git] / lunaix-os / includes / lunaix / types.h
1 #ifndef __LUNAIX_TYPES_H
2 #define __LUNAIX_TYPES_H
3
4 #include <stdint.h>
5
6 #define PEXITTERM 0x100
7 #define PEXITSTOP 0x200
8 #define PEXITSIG 0x400
9
10 #define PEXITNUM(flag, code) (flag | (code & 0xff))
11
12 #define WNOHANG 1
13 #define WUNTRACED 2
14 #define WEXITSTATUS(wstatus) ((wstatus & 0xff))
15 #define WIFSTOPPED(wstatus) ((wstatus & PEXITSTOP))
16 #define WIFEXITED(wstatus)                                                     \
17     ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
18
19 #define WIFSIGNALED(wstatus) ((wstatus & PEXITSIG))
20 // TODO: WTERMSIG
21
22 typedef int32_t pid_t;
23
24 #endif /* __LUNAIX_TYPES_H */