#ifndef _COMPILER_H #define _COMPILER_H /* performance tweaking stuff */ #if __GNUC__ == 2 && __GNUC_MINOR__ < 96 #define __builtin_expect(x, expected_value) (x) #endif #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) #ifdef __unix__ // deprecated // #define __LIKELY_IF(condition) if( likely(condition)) #define __UNLIKELY_IF(condition) if( unlikely(condition)) #else #define __LIKELY_IF(condition) if( condition) #define __UNLIKELY_IF(condition) if( condition) #endif #endif /* _COMPILER_H */