Possible Duplicate:
likely/unlikely macros in the Linux kernel
In the Linux kernel, I came across the line in ./linux/include/shed.h:
if (unlikely(atomic_dec_and_test(&mm->mm_count)))
What exactly is the point of unlikely? I've found a definition of it in .arch/x86/tools/insn_sanity.c, but it's just:
#define unlikely(cond) (cond)
To me there doesn't seem to be a point to using unlikely()
at all. What is the intended purpose of unlikely
?