Thank you for your reply.More correct would be next:
So, for example, the expression "if (likely(prev != next))" is same as "if ((prev != next) == 1)", isn't it?
if (gcc support __builtin_expect) {
we do nothing and likely(prev!=next) => __builtin_expect((prev!=next),1)
then gcc use this information for optimization, this branch of code would be more otimized then alternatives.
} else {
likely(prev!=next) => (prev != next)
so we don't break compilation and don't do any optimization.
}
Then, unlikely is opposite of that.
yes [snip] Best regards. Ruslan.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/