[PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space

From: Ingo Molnar
Date: Wed Jun 17 2015 - 05:07:11 EST


Reported-by: Riku Voipio <riku.voipio@xxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
tools/perf/util/include/linux/rcupdate.h | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/tools/perf/util/include/linux/rcupdate.h b/tools/perf/util/include/linux/rcupdate.h
new file mode 100644
index 000000000000..3e022dd9a69b
--- /dev/null
+++ b/tools/perf/util/include/linux/rcupdate.h
@@ -0,0 +1,9 @@
+#ifndef PERF_LINUX_RCUPDATE_H_
+#define PERF_LINUX_RCUPDATE_H_
+
+/* Simple trivial wrappers for now, we don't use RCU in perf user-space (yet): */
+#define WRITE_ONCE(var, val) ((var) = (val))
+#define rcu_assign_pointer(ptr, val) WRITE_ONCE(ptr, val)
+
+#endif
+
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/