#definelikely(x)__builtin_expect(!!(x),1)
Check if a branch is likely to be taken.
This compiler builtin allows the developer to indicate if a branch is likely to be taken. Example:
if (likely(x > 1)) do_stuff();
Definition at line 26 of file rte_branch_prediction.h.
#defineunlikely(x)__builtin_expect(!!(x),0)
Check if a branch is unlikely to be taken.
This compiler builtin allows the developer to indicate if a branch is unlikely to be taken. Example:
if (unlikely(x<1)) do_stuff();
Definition at line 43 of file rte_branch_prediction.h.