annotation: add 'expect' wrapper
This commit is contained in:
parent
2c47a3654d
commit
5d8ee88772
@ -30,4 +30,13 @@ bool
|
|||||||
unlikely (T &&t)
|
unlikely (T &&t)
|
||||||
{ return __builtin_expect (!!t, false); }
|
{ return __builtin_expect (!!t, false); }
|
||||||
|
|
||||||
|
|
||||||
|
constexpr inline
|
||||||
|
long
|
||||||
|
expect (long val, long typical)
|
||||||
|
{
|
||||||
|
return __builtin_expect (val, typical);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user