Preprocessor macro expanding to an expression
#include <SYS/TYPES.H>
if (__likely(condition)) ...
This macro returns its argument and informs the compiler that the argument is likely non-zero. The compiler uses this information to optimize placement of code branches following an if
or while
statement.
int
. Be especially careful to not pass long or pointer values to this function.This macro returns its argument unchanged.
On gcc compiler, this macro expands to __builtin_expect((condition), 1)
function.