X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=common%2Fcommon.h;h=896eaccb1f70c979a745d88384e51669ec79bcd2;hb=c7ca68d5bda0b49e7b7bc6a997a4140e6197bf11;hp=30ce1d8ca9a4a78665eaa9111861efcfa2399960;hpb=bcdb5e34f3c251407304e01eea26607e77dd8609;p=apps%2Fpfixtools.git diff --git a/common/common.h b/common/common.h index 30ce1d8..896eacc 100644 --- a/common/common.h +++ b/common/common.h @@ -70,6 +70,9 @@ typedef void (*exitcall_t)(void); #define module_init(fn) static __init initcall_t __init_##fn = fn; #define module_exit(fn) static __exit exitcall_t __exit_##fn = fn; +#define likely(expr) __builtin_expect((expr) != 0, 1) +#define unlikely(expr) __builtin_expect((expr) != 0, 0) + #define __log(Level, Fmt, ...) \ if (log_level >= Level) { \ if (log_syslog) { \