PUD: add wireformat libraries
[olsrd.git] / lib / pud / wireformat / include / OlsrdPudWireFormat / compiler.h
1 #ifndef _PUD_COMPILER_H_
2 #define _PUD_COMPILER_H_
3
4 /** Compiler hint to expect x */
5 #ifndef likely
6 # if defined(__GNUC__)
7 #  define likely(x)                                     __builtin_expect((x),1)
8 # else
9 #  define likely(x)                                             (x)
10 # endif
11 #endif
12
13 /** Compiler hint to not expect x */
14 #ifndef unlikely
15 # if defined(__GNUC__)
16 #  define unlikely(x)                                   __builtin_expect((x),0)
17 # else
18 #  define unlikely(x)                                   (x)
19 # endif
20 #endif
21
22 #endif /* _PUD_COMPILER_H_ */