Commit 9eacb5c7 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

sched: Move struct task_cputime to types.h



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

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190821192920.909530418@linutronix.de
parent 2b69942f
Loading
Loading
Loading
Loading
+1 −16
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/resource.h>
#include <linux/resource.h>
#include <linux/latencytop.h>
#include <linux/latencytop.h>
#include <linux/sched/prio.h>
#include <linux/sched/prio.h>
#include <linux/sched/types.h>
#include <linux/signal_types.h>
#include <linux/signal_types.h>
#include <linux/mm_types_task.h>
#include <linux/mm_types_task.h>
#include <linux/task_io_accounting.h>
#include <linux/task_io_accounting.h>
@@ -245,22 +246,6 @@ struct prev_cputime {
#endif
#endif
};
};


/**
 * 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;
};

/* Alternate field names when used on cache expirations: */
/* Alternate field names when used on cache expirations: */
#define virt_exp			utime
#define virt_exp			utime
#define prof_exp			stime
#define prof_exp			stime
+23 −0
Original line number Original line Diff line number Diff line
/* 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