aboutsummaryrefslogtreecommitdiff
path: root/tools/include/linux
diff options
context:
space:
mode:
authorJames Morris <[email protected]>2014-04-14 11:23:14 +1000
committerJames Morris <[email protected]>2014-04-14 11:23:14 +1000
commitecd740c6f2f092b90b95fa35f757973589eaaca2 (patch)
treece02b1e18c4fc5729699251460cd8be7604d8401 /tools/include/linux
parentf64410ec665479d7b4b77b7519e814253ed0f686 (diff)
parent455c6fdbd219161bd09b1165f11699d6d73de11c (diff)
Merge commit 'v3.14' into next
Diffstat (limited to 'tools/include/linux')
-rw-r--r--tools/include/linux/compiler.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h
new file mode 100644
index 000000000000..fbc6665c6d53
--- /dev/null
+++ b/tools/include/linux/compiler.h
@@ -0,0 +1,38 @@
+#ifndef _TOOLS_LINUX_COMPILER_H_
+#define _TOOLS_LINUX_COMPILER_H_
+
+#ifndef __always_inline
+# define __always_inline inline __attribute__((always_inline))
+#endif
+
+#define __user
+
+#ifndef __attribute_const__
+# define __attribute_const__
+#endif
+
+#ifndef __maybe_unused
+# define __maybe_unused __attribute__((unused))
+#endif
+
+#ifndef __packed
+# define __packed __attribute__((__packed__))
+#endif
+
+#ifndef __force
+# define __force
+#endif
+
+#ifndef __weak
+# define __weak __attribute__((weak))
+#endif
+
+#ifndef likely
+# define likely(x) __builtin_expect(!!(x), 1)
+#endif
+
+#ifndef unlikely
+# define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
+
+#endif /* _TOOLS_LINUX_COMPILER_H */