Add general-use branch-prediction macros

This commit is contained in:
Aaron Culliney 2015-01-23 23:34:03 -08:00
parent b8c44b81ab
commit b4516b49df

View File

@ -203,4 +203,8 @@ extern FILE *error_log;
} while (0)
#endif
// branch prediction
#define LIKELY(x) __builtin_expect((x), true)
#define UNLIKELY(x) __builtin_expect((x), false)
#endif // whole file