@ -77,4 +77,12 @@
#define CK_CC_CACHELINE
#endif
#ifndef CK_CC_LIKELY
#define CK_CC_LIKELY(x)
#ifndef CK_CC_UNLIKELY
#define CK_CC_UNLIKELY(x)
#endif /* _CK_CC_H */
@ -75,6 +75,12 @@
#pragma GCC poison malloc free
/*
* Branch execution hints.
*/
#define CK_CC_LIKELY(x) (__builtin_expect(!!(x), 1))
#define CK_CC_UNLIKELY(x) (__builtin_expect(!!(x), 0))
* Some compilers are overly strict regarding aliasing semantics.
* Unfortunately, in many cases it makes more sense to pay aliasing