[all] provide conditional path optimization hints to the compiler

This commit is contained in:
Geoffrey McRae
2023-11-12 18:26:08 +11:00
parent 7bea919352
commit 929e88b9d3
8 changed files with 117 additions and 94 deletions

View File

@@ -40,4 +40,7 @@
#define ALIGN_TO(value, align) (((value) + (align) - 1) & -(align))
#define unlikely(expr) __builtin_expect(!!(expr), 0)
#define likely(expr) __builtin_expect(!!(expr), 1)
#endif