path: root/tools/include/asm
diff options
authorArnaldo Carvalho de Melo <>2015-04-07 11:53:41 -0300
committerArnaldo Carvalho de Melo <>2015-05-08 16:11:05 -0300
commitda6d8567512df11e0473b710c07de87efde5709c (patch)
tree24601b1c6d8347e03517c8c24959171ba34dd3c5 /tools/include/asm
parent42b09d7b0e3d57a92b938fde5fcb532e9a88e1ea (diff)
tools include: Add basic atomic.h implementation from the kernel sources
Uses the arch/x86/ kernel code for x86_64/i386, fallbacking to a gcc intrinsics implementation that has been tested in at least sparc64. Will be used for reference counting in tools/perf. Acked-by: David Ahern <> Cc: Adrian Hunter <> Cc: Borislav Petkov <> Cc: Don Zickus <> Cc: Frederic Weisbecker <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Cc: Peter Zijlstra <> Cc: Stephane Eranian <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/include/asm')
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/asm/atomic.h b/tools/include/asm/atomic.h
new file mode 100644
index 000000000000..70794f538a86
--- /dev/null
+++ b/tools/include/asm/atomic.h
@@ -0,0 +1,10 @@
+#if defined(__i386__) || defined(__x86_64__)
+#include "../../arch/x86/include/asm/atomic.h"
+#include <asm-generic/atomic-gcc.h>
+#endif /* __TOOLS_LINUX_ASM_ATOMIC_H */