diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-07-22 18:05:48 +0200 |
---|---|---|
committer | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-07-22 18:05:48 +0200 |
commit | 1d2f37945d1b3a14086c5ea802486778b635cf97 (patch) | |
tree | b40a1a596a29acc1511f661c27f284dd06b0bc9d /tools/perf/util/include/linux/kernel.h | |
parent | 1483b19f8f5e8ad0c8816de368b099322dad4db5 (diff) | |
parent | f1c6a58121f9846ac665b0fbd3cbab90ce8bcbac (diff) |
Merge commit 'tip/perfcounters/core' into perf-counters-for-linus
Diffstat (limited to 'tools/perf/util/include/linux/kernel.h')
-rw-r--r-- | tools/perf/util/include/linux/kernel.h | 8 |
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 99c1b3d1edd..a6b87390cb5 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 |