aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-08-21 21:09:05 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-08-28 11:50:34 +0200
commit9eacb5c7e6607aba00a7322b21cad83fc8b101c8 (patch)
treec559a8456307d33b7c56e304466b7524a925ed3f /include/linux/sched
parentposix-cpu-timers: Create a container struct (diff)
downloadlinux-dev-9eacb5c7e6607aba00a7322b21cad83fc8b101c8.tar.xz
linux-dev-9eacb5c7e6607aba00a7322b21cad83fc8b101c8.zip
sched: Move struct task_cputime to types.h
For upcoming posix-timer changes to avoid include recursion hell. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20190821192920.909530418@linutronix.de
Diffstat (limited to 'include/linux/sched')
-rw-r--r--include/linux/sched/types.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/sched/types.h b/include/linux/sched/types.h
new file mode 100644
index 000000000000..2c5c28ddd9b2
--- /dev/null
+++ b/include/linux/sched/types.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_SCHED_TYPES_H
+#define _LINUX_SCHED_TYPES_H
+
+#include <linux/types.h>
+
+/**
+ * struct task_cputime - collected CPU time counts
+ * @utime: time spent in user mode, in nanoseconds
+ * @stime: time spent in kernel mode, in nanoseconds
+ * @sum_exec_runtime: total time spent on the CPU, in nanoseconds
+ *
+ * This structure groups together three kinds of CPU time that are tracked for
+ * threads and thread groups. Most things considering CPU time want to group
+ * these counts together and treat all three of them in parallel.
+ */
+struct task_cputime {
+ u64 utime;
+ u64 stime;
+ unsigned long long sum_exec_runtime;
+};
+
+#endif