]> mj.ucw.cz Git - libucw.git/commitdiff
Added macros for hinting branch predictor.
authorMartin Mares <mj@ucw.cz>
Thu, 12 Jun 2003 21:36:57 +0000 (21:36 +0000)
committerMartin Mares <mj@ucw.cz>
Thu, 12 Jun 2003 21:36:57 +0000 (21:36 +0000)
lib/config.h

index ee782b69d87a11df686788cd754ff4f443b4125c..cc2d86da15ac5f3ec43f2dd11b6dfb5ae938f4a5 100644 (file)
@@ -83,6 +83,8 @@ typedef s32 sh_off_t;
 #define PACKED __attribute__((packed))
 #define CONST __attribute__((const))
 #define PURE __attribute__((const))
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
 
 #else
 #error This program requires the GNU C compiler.