Add likely/unlikely macros

This commit is contained in:
Jeffrey Pfau 2014-10-22 22:39:36 -07:00
parent c9f0ac5c7b
commit 37554a40ea
1 changed files with 3 additions and 0 deletions

View File

@ -61,4 +61,7 @@
}
#define DECL_BIT(TYPE, FIELD, BIT) DECL_BITS(TYPE, FIELD, BIT, 1)
#define LIKELY(X) __builtin_expect(!!(X), 1)
#define UNLIKELY(X) __builtin_expect(!!(X), 0)
#endif