diff options
Diffstat (limited to 'tools/testing/radix-tree/linux/percpu.h')
-rw-r--r-- | tools/testing/radix-tree/linux/percpu.h | 7 |
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 @@ | |||
1 | |||
2 | #define DEFINE_PER_CPU(type, val) type val | ||
3 | |||
4 | #define __get_cpu_var(var) var | ||
5 | #define this_cpu_ptr(var) var | ||
6 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | ||
7 | #define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu)) | ||