aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..08e78a8
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,31 @@
1#ifndef BDL_COMMON_H
2#define BDL_COMMON_H
3
4#include <assert.h>
5#include <stdbool.h>
6#include <stddef.h>
7#include <stdint.h>
8
9typedef uint8_t u8;
10typedef uint16_t u16;
11typedef uint32_t u32;
12typedef uint64_t u64;
13typedef int8_t s8;
14typedef int16_t s16;
15typedef int32_t s32;
16typedef int64_t s64;
17typedef volatile u8 vu8;
18typedef volatile u16 vu16;
19typedef volatile u32 vu32;
20typedef volatile u64 vu64;
21typedef volatile s8 vs8;
22typedef volatile s16 vs16;
23typedef volatile s32 vs32;
24typedef volatile s64 vs64;
25
26#define KB(N) ((u64)(N) * 1024)
27#define MB(N) ((u64)KB(N) * 1024)
28#define GB(N) ((u64)MB(N) * 1024)
29#define TB(N) ((u64)GB(N) * 1024)
30
31#endif // BDL_COMMON_H