annotation: add 'expect' wrapper

This commit is contained in:
Danny Robson 2018-08-01 13:07:58 +10:00
parent 2c47a3654d
commit 5d8ee88772

View File

@ -30,4 +30,13 @@ bool
unlikely (T &&t)
{ return __builtin_expect (!!t, false); }
constexpr inline
long
expect (long val, long typical)
{
return __builtin_expect (val, typical);
}
#endif