summaryrefslogtreecommitdiffstats
path: root/src/basic/macro.h
diff options
context:
space:
mode:
authorArian van Putten <arian.vanputten@gmail.com>2020-10-14 13:47:17 +0200
committerLennart Poettering <lennart@poettering.net>2020-10-21 14:29:48 +0200
commit429495163cbc1eb331a15d16fb26c829aa43ff0d (patch)
tree4a080ce14b6b8ed166be267208d6f33305662780 /src/basic/macro.h
parentMerge pull request #17395 from keszybz/hwdb-drop-quotes (diff)
downloadsystemd-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.h6
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) \