]> git.karo-electronics.de Git - karo-tx-linux.git/blob - tools/include/linux/compiler.h
Merge remote-tracking branches 'regulator/fix/ab3100' and 'regulator/fix/s2mps11...
[karo-tx-linux.git] / tools / include / linux / compiler.h
1 #ifndef _TOOLS_LINUX_COMPILER_H_
2 #define _TOOLS_LINUX_COMPILER_H_
3
4 #ifndef __always_inline
5 # define __always_inline        inline __attribute__((always_inline))
6 #endif
7
8 #define __user
9
10 #ifndef __attribute_const__
11 # define __attribute_const__
12 #endif
13
14 #ifndef __maybe_unused
15 # define __maybe_unused         __attribute__((unused))
16 #endif
17
18 #ifndef __packed
19 # define __packed               __attribute__((__packed__))
20 #endif
21
22 #ifndef __force
23 # define __force
24 #endif
25
26 #ifndef __weak
27 # define __weak                 __attribute__((weak))
28 #endif
29
30 #ifndef likely
31 # define likely(x)              __builtin_expect(!!(x), 1)
32 #endif
33
34 #ifndef unlikely
35 # define unlikely(x)            __builtin_expect(!!(x), 0)
36 #endif
37
38 #endif /* _TOOLS_LINUX_COMPILER_H */