mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-16 07:45:23 -04: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
|
/* Evaluates to the same boolean value as 'p', and hints to the compiler that
|
||||||
* we expect this value to be false. */
|
* we expect this value to be false. */
|
||||||
#ifdef __GNUC__X
|
#ifdef __GNUC__
|
||||||
#define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
|
#define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
|
||||||
#else
|
#else
|
||||||
#define EVUTIL_UNLIKELY(p) (p)
|
#define EVUTIL_UNLIKELY(p) (p)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user