Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Move ACCESS_ONCE from perf.h header

Into tools/include/linux/compiler.h header.

Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-9sk90owm370kuq3f0ssjjui2@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>

Jiri Olsa 73a31b7c 82baa0eb

+2 -2
+2
tools/include/linux/compiler.h
··· 35 35 # define unlikely(x) __builtin_expect(!!(x), 0) 36 36 #endif 37 37 38 + #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) 39 + 38 40 #endif /* _TOOLS_LINUX_COMPILER_H */
-2
tools/perf/perf.h
··· 14 14 #define HAVE_ATTR_TEST 15 15 #include "perf-sys.h" 16 16 17 - #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) 18 - 19 17 #ifndef NSEC_PER_SEC 20 18 # define NSEC_PER_SEC 1000000000ULL 21 19 #endif