mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
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:
parent
29151e65b7
commit
eaaf27f1f7
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user