From: Nick Mathewson Date: Wed, 6 Jan 2010 23:41:46 +0000 (-0500) Subject: Enable branch-prediction hints with EVUTIL_UNLIKELY. X-Git-Tag: release-2.0.4-alpha~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaaf27f1f7b834bf60a1003c4d9c32a9a346b1dc;p=libevent Enable branch-prediction hints with EVUTIL_UNLIKELY. This had been accidentally disabled. Since it seems to work with GCC, I'm turning it back on when GCC is present. --- diff --git a/util-internal.h b/util-internal.h index 509f7299..af68a9e3 100644 --- a/util-internal.h +++ b/util-internal.h @@ -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)