summaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/linux/percpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/radix-tree/linux/percpu.h')
-rw-r--r--tools/testing/radix-tree/linux/percpu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/radix-tree/linux/percpu.h b/tools/testing/radix-tree/linux/percpu.h
new file mode 100644
index 000000000000..5837f1d56f17
--- /dev/null
+++ b/tools/testing/radix-tree/linux/percpu.h
@@ -0,0 +1,7 @@
+
+#define DEFINE_PER_CPU(type, val) type val
+
+#define __get_cpu_var(var) var
+#define this_cpu_ptr(var) var
+#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
+#define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu))