History

sched: Move struct task_cputime to types.h

For upcoming posix-timer changes to avoid include recursion hell.

Thomas Gleixner committed 7 years ago

Commit 9eacb5c1 parent 2b699422 files · +24 −16Browse files

Unified · Split

2 files
  1. include/linux/sched.h +1 −16
  2. include/linux/sched/types.h +23 −0
include/linux/sched.h+1−16
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include <linux/resource.h>
2626 #include <linux/latencytop.h>
2727 #include <linux/sched/prio.h>
28+#include <linux/sched/types.h>
2829 #include <linux/signal_types.h>
2930 #include <linux/mm_types_task.h>
3031 #include <linux/task_io_accounting.h>
@@ -245,22 +246,6 @@ struct prev_cputime { · 214 unmodified lines
245246 #endif
246247 };
247248
248−/**
249− * struct task_cputime - collected CPU time counts
250− * @utime: time spent in user mode, in nanoseconds
251− * @stime: time spent in kernel mode, in nanoseconds
252− * @sum_exec_runtime: total time spent on the CPU, in nanoseconds
253− *
254− * This structure groups together three kinds of CPU time that are tracked for
255− * threads and thread groups. Most things considering CPU time want to group
256− * these counts together and treat all three of them in parallel.
257− */
258−struct task_cputime {
259− u64 utime;
260− u64 stime;
261− unsigned long long sum_exec_runtime;
262−};
263−
264249 /* Alternate field names when used on cache expirations: */
265250 #define virt_exp utime
266251 #define prof_exp stime
include/linux/sched/types.h+23−0
@@ -0,0 +1,23 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef _LINUX_SCHED_TYPES_H
3+#define _LINUX_SCHED_TYPES_H
4+
5+#include <linux/types.h>
6+
7+/**
8+ * struct task_cputime - collected CPU time counts
9+ * @utime: time spent in user mode, in nanoseconds
10+ * @stime: time spent in kernel mode, in nanoseconds
11+ * @sum_exec_runtime: total time spent on the CPU, in nanoseconds
12+ *
13+ * This structure groups together three kinds of CPU time that are tracked for
14+ * threads and thread groups. Most things considering CPU time want to group
15+ * these counts together and treat all three of them in parallel.
16+ */
17+struct task_cputime {
18+ u64 utime;
19+ u64 stime;
20+ unsigned long long sum_exec_runtime;
21+};
22+
23+#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t