Interface __likely

Preprocessor macro expanding to an expression

#include <SYS/TYPES.H>

if (__likely(condition)) ...

Description

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.

Arguments

Returns

This macro returns its argument unchanged.

Implementation note

On gcc compiler, this macro expands to __builtin_expect((condition), 1) function.

See also

__unlikely