diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2019-08-21 22:09:24 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-08-28 12:50:42 +0300 |
commit | 244d49e30653658d4e7e9b2b8427777cbbc5affe (patch) | |
tree | 97754f775acd11c4bc98b43f69234dfb525cb175 /include/linux/posix-timers.h | |
parent | 8991afe2640d05a805eba01277856e8549cdc838 (diff) | |
download | linux-244d49e30653658d4e7e9b2b8427777cbbc5affe.tar.xz |
posix-cpu-timers: Move state tracking to struct posix_cputimers
Put it where it belongs and clean up the ifdeffery in fork completely.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190821192922.743229404@linutronix.de
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r-- | include/linux/posix-timers.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 3ea920e8fe7f..a9e3f69d2db4 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -77,15 +77,23 @@ struct posix_cputimer_base { /** * posix_cputimers - Container for posix CPU timer related data * @bases: Base container for posix CPU clocks + * @timers_active: Timers are queued. + * @expiry_active: Timer expiry is active. Used for + * process wide timers to avoid multiple + * task trying to handle expiry concurrently * * Used in task_struct and signal_struct */ struct posix_cputimers { struct posix_cputimer_base bases[CPUCLOCK_MAX]; + unsigned int timers_active; + unsigned int expiry_active; }; static inline void posix_cputimers_init(struct posix_cputimers *pct) { + pct->timers_active = 0; + pct->expiry_active = 0; pct->bases[0].nextevt = U64_MAX; pct->bases[1].nextevt = U64_MAX; pct->bases[2].nextevt = U64_MAX; |