]> granicus.if.org Git - libevent/commitdiff
Enable branch-prediction hints with EVUTIL_UNLIKELY.
authorNick Mathewson <nickm@torproject.org>
Wed, 6 Jan 2010 23:41:46 +0000 (18:41 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 6 Jan 2010 23:50:19 +0000 (18:50 -0500)
This had been accidentally disabled.  Since it seems to work with GCC, I'm
turning it back on when GCC is present.

util-internal.h

index 509f72997a7959c4f66f407af662e260d388bce1..af68a9e31199c25f7532d2c6a4fd178c3b6853a6 100644 (file)
@@ -150,7 +150,7 @@ long _evutil_weakrand(void);
 
 /* Evaluates to the same boolean value as 'p', and hints to the compiler that
  * we expect this value to be false. */
-#ifdef __GNUC__X
+#ifdef __GNUC__
 #define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
 #else
 #define EVUTIL_UNLIKELY(p) (p)