summaryrefslogtreecommitdiff
path: root/tools/perf/util/include/linux/kernel.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-04 11:58:28 (GMT)
committerIngo Molnar <mingo@elte.hu>2009-08-04 11:58:28 (GMT)
commite16852cfc5580b88cb327413ab8c89375f380592 (patch)
tree67e7d5b84e2602986f2da689625e5a25d7af7bb4 /tools/perf/util/include/linux/kernel.h
parentbdff78707f3ce47e891f3201c9666122a70556ce (diff)
parent74e7ff8c50b6b022e6ffaa736b16a4dc161d3eaf (diff)
downloadlinux-fsl-qoriq-e16852cfc5580b88cb327413ab8c89375f380592.tar.xz
Merge branch 'tracing/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/urgent
Diffstat (limited to 'tools/perf/util/include/linux/kernel.h')
-rw-r--r--tools/perf/util/include/linux/kernel.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h
index 99c1b3d..a6b8739 100644
--- a/tools/perf/util/include/linux/kernel.h
+++ b/tools/perf/util/include/linux/kernel.h
@@ -18,4 +18,12 @@
(type *)((char *)__mptr - offsetof(type, member)); })
#endif
+#ifndef max
+#define max(x, y) ({ \
+ typeof(x) _max1 = (x); \
+ typeof(y) _max2 = (y); \
+ (void) (&_max1 == &_max2); \
+ _max1 > _max2 ? _max1 : _max2; })
+#endif
+
#endif