diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-08-21 22:09:04 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-08-28 12:50:33 +0300 |
commit | 2b69942f9021bf75bd1b001f53bd2578361fadf3 (patch) | |
tree | 1d51a30bd34edc3c0a723a306199b1018e404db3 /include/linux/sched.h | |
parent | ab693c5a5e3107f035d5162e6ada9aaf7dd76a1d (diff) | |
download | linux-2b69942f9021bf75bd1b001f53bd2578361fadf3.tar.xz |
posix-cpu-timers: Create a container struct
Per task/process data of posix CPU timers is all over the place which
makes the code hard to follow and requires ifdeffery.
Create a container to hold all this information in one place, so data is
consolidated and the ifdeffery can be confined to the posix timer header
file and removed from places like fork.
As a first step, move the cpu_timers list head array into the new struct
and clean up the initializers and simplify fork. The remaining #ifdef in
fork will be removed later.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192920.819418976@linutronix.de
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8dc1811487f5..fde844a3b86e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -28,6 +28,7 @@ #include <linux/signal_types.h> #include <linux/mm_types_task.h> #include <linux/task_io_accounting.h> +#include <linux/posix-timers.h> #include <linux/rseq.h> /* task_struct member predeclarations (sorted alphabetically): */ @@ -878,8 +879,9 @@ struct task_struct { #ifdef CONFIG_POSIX_TIMERS struct task_cputime cputime_expires; - struct list_head cpu_timers[3]; #endif + /* Empty if CONFIG_POSIX_CPUTIMERS=n */ + struct posix_cputimers posix_cputimers; /* Process credentials: */ |