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.
This commit is contained in:
Nick Mathewson 2010-01-06 18:41:46 -05:00
parent 29151e65b7
commit eaaf27f1f7

View 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)