]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Use kernel error check functions
authorLan Tianyu <tianyu.lan@intel.com>
Thu, 15 Dec 2011 13:40:14 +0000 (21:40 +0800)
committerPekka Enberg <penberg@kernel.org>
Sat, 17 Dec 2011 07:28:02 +0000 (09:28 +0200)
Add compiler.h file to support using kernel error check funciotns(e.g
ERR_PTR, PTR_ERR and so on).

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/linux/compiler.h [new file with mode: 0644]

diff --git a/tools/kvm/include/linux/compiler.h b/tools/kvm/include/linux/compiler.h
new file mode 100644 (file)
index 0000000..bd360c2
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef _PERF_LINUX_COMPILER_H_
+#define _PERF_LINUX_COMPILER_H_
+
+#ifndef __always_inline
+#define __always_inline        inline
+#endif
+#define __user
+#define __attribute_const__
+
+#define __used         __attribute__((__unused__))
+#define __iomem
+#define __force
+#define __must_check
+#define unlikely
+
+#endif