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