feat: (iso9660) implement file read (for both interleaved and non-interleaved mode)
[lunaix-os.git] / lunaix-os / includes / lunaix / types.h
1 #ifndef __LUNAIX_TYPES_H
2 #define __LUNAIX_TYPES_H
3
4 #include <stdarg.h>
5 #include <stddef.h>
6 #include <stdint.h>
7
8 #define PEXITTERM 0x100
9 #define PEXITSTOP 0x200
10 #define PEXITSIG 0x400
11
12 #define PEXITNUM(flag, code) (flag | (code & 0xff))
13
14 #define WNOHANG 1
15 #define WUNTRACED 2
16 #define WEXITSTATUS(wstatus) ((wstatus & 0xff))
17 #define WIFSTOPPED(wstatus) ((wstatus & PEXITSTOP))
18 #define WIFEXITED(wstatus)                                                     \
19     ((wstatus & PEXITTERM) && ((char)WEXITSTATUS(wstatus) >= 0))
20
21 #define WIFSIGNALED(wstatus) ((wstatus & PEXITSIG))
22
23 #define PACKED __attribute__((packed))
24
25 // TODO: WTERMSIG
26
27 // TODO: replace the integer type with these. To make thing more portable.
28
29 typedef unsigned char u8_t;
30 typedef unsigned short u16_t;
31 typedef unsigned int u32_t;
32 typedef unsigned long long u64_t;
33 typedef unsigned long ptr_t;
34 typedef signed long ssize_t;
35
36 typedef int32_t pid_t;
37 typedef int64_t lba_t;
38
39 #endif /* __LUNAIX_TYPES_H */