12.1.0 and agnostic support until next key change

This commit is contained in:
shchmue 2021-07-06 11:14:55 -06:00
parent 433f989b4f
commit 9110d8d405
4 changed files with 57 additions and 36 deletions

View file

@ -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)))