12.1.0 and agnostic support until next key change
This commit is contained in:
parent
433f989b4f
commit
9110d8d405
4 changed files with 57 additions and 36 deletions
|
@ -30,6 +30,8 @@
|
|||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
|
||||
#define LOG2(n) (32 - __builtin_clz(n) - 1)
|
||||
#define CLZ(n) __builtin_clz(n)
|
||||
#define CLO(n) __builtin_clz(~n)
|
||||
|
||||
#define OFFSET_OF(t, m) ((u32)&((t *)NULL)->m)
|
||||
#define CONTAINER_OF(mp, t, mn) ((t *)((u32)mp - OFFSET_OF(t, mn)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue