@@ -185,6 +185,16 @@ struct ottery_prf { | |||
void (*generate)(void *state, uint8_t *output, uint32_t idx); | |||
}; | |||
/** | |||
* Evaluate the condition 'x', while hinting to the compiler that it is | |||
* likely to be false. | |||
*/ | |||
#ifdef __GNUC__ | |||
#define UNLIKELY(x) __builtin_expect((x), 0) | |||
#else | |||
#define UNLIKELY(x) (x) | |||
#endif | |||
#ifdef OTTERY_INTERNAL | |||
struct ottery_config { | |||
/** The PRF that we should use. If NULL, we use the default. */ |
@@ -33,12 +33,6 @@ | |||
#define OTTERY_NO_PID_CHECK | |||
#endif | |||
/** | |||
* Evaluate the condition 'x', while hinting to the compiler that it is | |||
* likely to be false. | |||
*/ | |||
#define UNLIKELY(x) __builtin_expect((x), 0) | |||
/** Magic number for deciding whether an ottery_state is initialized. */ | |||
#define MAGIC_BASIS 0x11b07734 | |||
@@ -17,15 +17,6 @@ | |||
#include "ottery.h" | |||
#include "ottery_st.h" | |||
/** | |||
* Evaluate the condition 'x', while hinting to the compiler that it is | |||
* likely to be false. | |||
*/ | |||
#ifdef __GNUC__ | |||
#define UNLIKELY(x) __builtin_expect((x), 0) | |||
#else | |||
#define UNLIKELY(x) (x) | |||
#endif | |||
/** Flag: true iff ottery_global_state_ is initialized. */ | |||
static int ottery_global_state_initialized_ = 0; |