|
#define | FALSE 0u |
|
#define | TRUE 1u |
|
#define | USE_PARA(para) (para = (para)) |
|
#define | MIN(v0, v1) (((v0) > (v1)) ? (v1) : (v0)) |
|
#define | MAX(v0, v1) (((v0) > (v1)) ? (v0) : (v1)) |
|
#define | ABS(v) (((v) >= 0) ? (v) : (-(v))) |
|
#define | SWAP(a, b) (a = (a) + (b),b = (a) - (b),a = (a) - (b)) |
|
#define | COUNT_OF(a) (sizeof(a)/sizeof(a[0])) |
|
#define | _STR(a) #a |
|
#define | STR(a) _STR(a) |
|
#define | _CONS(a, b) a##b |
|
#define | CONS(a, b) _CONS(a,b) |
|
#define | ALIGN_F(pointer, power2) (((IPTRDIFF)(pointer) + ((IPTRDIFF)((power2) - 1))) & (~((IPTRDIFF)((power2) - 1)))) |
|
#define | ALIGN_B(pointer, power2) ((IPTRDIFF)(pointer) & (~((IPTRDIFF)((power2) - 1)))) |
|
basic macros defination.