diff options
author | Arian van Putten <arian.vanputten@gmail.com> | 2020-10-14 13:47:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-10-21 14:29:48 +0200 |
commit | 429495163cbc1eb331a15d16fb26c829aa43ff0d (patch) | |
tree | 4a080ce14b6b8ed166be267208d6f33305662780 /src/basic/macro.h | |
parent | Merge pull request #17395 from keszybz/hwdb-drop-quotes (diff) | |
download | systemd-429495163cbc1eb331a15d16fb26c829aa43ff0d.tar.xz systemd-429495163cbc1eb331a15d16fb26c829aa43ff0d.zip |
cgtop: Display cpu time in microseonds with --raw
this makes the CPU time easily parseable; which was the goal
of --raw in the first place.
This only triggers if --raw is combined with --cpu=time
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index e0fe990bef..7aa51fe939 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -281,6 +281,12 @@ static inline size_t GREEDY_ALLOC_ROUND_UP(size_t l) { MAX(_c, z); \ }) +#define MAX4(x, y, z, a) \ + ({ \ + const typeof(x) _d = MAX3(x, y, z); \ + MAX(_d, a); \ + }) + #undef MIN #define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b)) #define __MIN(aq, a, bq, b) \ |