Go to the documentation of this file.
12 #include <kiba/core/config.h>
14 #include <kiba/core/types.h>
15 #include <kiba/core/version.h>
21 #define UNUSED(x) (void) x
24 #define TYPE_OF(x) __typeof__(x)
27 #define ALIGN_OF(x) _Alignof(x)
35 #define KB_MIN(x, y) ((x) < (y) ? (x) : (y))
43 #define KB_MAX(x, y) ((x) > (y) ? (x) : (y))
55 #define KB_CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
62 #define KB_FLAGS_ALL_SET(value, flags) (((value) & (flags)) == (flags))
67 #define KB_FLAGS_ANY_SET(value, flags) (((value) & (flags)) != 0)
72 #define KB_UBIT(n) ((u64) 1 << n)
77 #define KB_IBIT(n) ((i64) 1 << n)