aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h29
1 files changed, 4 insertions, 25 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f0edee94834a..b75b28287005 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -25,9 +25,11 @@
25#include <linux/resource.h> 25#include <linux/resource.h>
26#include <linux/latencytop.h> 26#include <linux/latencytop.h>
27#include <linux/sched/prio.h> 27#include <linux/sched/prio.h>
28#include <linux/sched/types.h>
28#include <linux/signal_types.h> 29#include <linux/signal_types.h>
29#include <linux/mm_types_task.h> 30#include <linux/mm_types_task.h>
30#include <linux/task_io_accounting.h> 31#include <linux/task_io_accounting.h>
32#include <linux/posix-timers.h>
31#include <linux/rseq.h> 33#include <linux/rseq.h>
32 34
33/* task_struct member predeclarations (sorted alphabetically): */ 35/* task_struct member predeclarations (sorted alphabetically): */
@@ -244,27 +246,6 @@ struct prev_cputime {
244#endif 246#endif
245}; 247};
246 248
247/**
248 * struct task_cputime - collected CPU time counts
249 * @utime: time spent in user mode, in nanoseconds
250 * @stime: time spent in kernel mode, in nanoseconds
251 * @sum_exec_runtime: total time spent on the CPU, in nanoseconds
252 *
253 * This structure groups together three kinds of CPU time that are tracked for
254 * threads and thread groups. Most things considering CPU time want to group
255 * these counts together and treat all three of them in parallel.
256 */
257struct task_cputime {
258 u64 utime;
259 u64 stime;
260 unsigned long long sum_exec_runtime;
261};
262
263/* Alternate field names when used on cache expirations: */
264#define virt_exp utime
265#define prof_exp stime
266#define sched_exp sum_exec_runtime
267
268enum vtime_state { 249enum vtime_state {
269 /* Task is sleeping or running in a CPU with VTIME inactive: */ 250 /* Task is sleeping or running in a CPU with VTIME inactive: */
270 VTIME_INACTIVE = 0, 251 VTIME_INACTIVE = 0,
@@ -881,10 +862,8 @@ struct task_struct {
881 unsigned long min_flt; 862 unsigned long min_flt;
882 unsigned long maj_flt; 863 unsigned long maj_flt;
883 864
884#ifdef CONFIG_POSIX_TIMERS 865 /* Empty if CONFIG_POSIX_CPUTIMERS=n */
885 struct task_cputime cputime_expires; 866 struct posix_cputimers posix_cputimers;
886 struct list_head cpu_timers[3];
887#endif
888 867
889 /* Process credentials: */ 868 /* Process credentials: */
890 869