From 8a625c1f61f3dd5e4ea4b5b642650416aa101ce5 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Thu, 9 Jan 2014 23:00:52 +0900 Subject: tools include: Move perf's linux/compiler.h to a generic place So that it can be shared with others like libtraceevent. Signed-off-by: Namhyung Kim Acked-by: Borislav Petkov Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1389276059-8829-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/linux/compiler.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tools/include/linux/compiler.h (limited to 'tools/include') diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h new file mode 100644 index 00000000000..0135ccf2a00 --- /dev/null +++ b/tools/include/linux/compiler.h @@ -0,0 +1,30 @@ +#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 + +#endif /* _TOOLS_LINUX_COMPILER_H */ -- cgit v1.2.3-70-g09d2