!!(x) ensures, the first argument to __builtin_expect is always 0 or 1 regardless of input.I understand the meaning of likely() and unlikely() in linux/compiler.h, but I don't undertand the meaning of !! in the definition.
#define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0)
why not this?:
#define likely(x) __builtin_expect((x), 1) #define unlikely(x) __builtin_expect((x), 0)
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/