feat: add signal handling support (not tested!)
[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 PROCTERM 0x10000
7 #define PROCSTOP 0x20000
8
9 #define WNOHANG 1
10 #define WUNTRACED 2
11 #define WEXITSTATUS(wstatus) ((wstatus & 0xffff))
12 #define WIFSTOPPED(wstatus) ((wstatus & PROCSTOP))
13 #define WIFEXITED(wstatus)                                                     \
14     ((wstatus & PROCTERM) && ((short)WEXITSTATUS(wstatus) >= 0))
15
16 typedef int32_t pid_t;
17
18 #endif /* __LUNAIX_TYPES_H */