1 #ifndef _TOOLS_LINUX_COMPILER_H_
2 #define _TOOLS_LINUX_COMPILER_H_
4 #ifndef __always_inline
5 # define __always_inline inline __attribute__((always_inline))
10 #ifndef __attribute_const__
11 # define __attribute_const__
14 #ifndef __maybe_unused
15 # define __maybe_unused __attribute__((unused))
19 # define __packed __attribute__((__packed__))
27 # define __weak __attribute__((weak))
31 # define likely(x) __builtin_expect(!!(x), 1)
35 # define unlikely(x) __builtin_expect(!!(x), 0)
38 #endif /* _TOOLS_LINUX_COMPILER_H */