-#define COMPILETIME_ASSERT(x, name) \
- static __attribute__((unused)) void compiletime_assert_##name (int h) { \
- switch(h) { case 0: case (x): ; } \
- }
-
-#ifdef __GNUC__
-/**
- * Indicates to the compiler that the value of x is very likely 1
- * @note Only use this in speed critical code and when you are sure x is often 1
- */
-#define LIKELY(x) __builtin_expect((x), 1)
-
-/**
- * Indicates to the compiler that it's very likely that x is 0
- * @note Only use this in speed critical code and when you are sure x is often 0
- */
-#define UNLIKELY(x) __builtin_expect((x), 0)
-#else
-#define LIKELY(x) x
-#define UNLIKELY(x) x
-#endif