diff options
Diffstat (limited to 'tools/include/linux/compiler.h')
-rw-r--r-- | tools/include/linux/compiler.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index 0135ccf2a00c..fbc6665c6d53 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h | |||
@@ -27,4 +27,12 @@ | |||
27 | # define __weak __attribute__((weak)) | 27 | # define __weak __attribute__((weak)) |
28 | #endif | 28 | #endif |
29 | 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 | |||
30 | #endif /* _TOOLS_LINUX_COMPILER_H */ | 38 | #endif /* _TOOLS_LINUX_COMPILER_H */ |