#define u8 unsigned char #define u16 unsigned short #define u32 unsigned int #define u64 unsigned long long #define bool int #define true 1 #define false 0 #define NULL 0 #define vu8 volatile u8 #define vu16 volatile u16 #define vu32 volatile u32 #define vu64 volatile u64 #define max(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b; }) #define min(a,b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a < _b ? _a : _b; })