summaryrefslogtreecommitdiffstats
path: root/include/linux/posix-timers.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-05-30 23:15:44 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-06-04 15:40:25 +0200
commitd97bb75ddd2f38068df01da8abf26df78756253c (patch)
tree7aad926faf0415a4eff6bc5a2efe409a81fc3f58 /include/linux/posix-timers.h
parent80105cd0e62ba8a2caf8eebd52f42952c7c04046 (diff)
downloadlinux-d97bb75ddd2f38068df01da8abf26df78756253c.tar.gz
linux-d97bb75ddd2f38068df01da8abf26df78756253c.tar.bz2
linux-d97bb75ddd2f38068df01da8abf26df78756253c.zip
posix-timers: Store k_clock pointer in k_itimer
Having the k_clock pointer in the k_itimer struct avoids the lookup in several code pathes and makes the next steps of unification of the hrtimer and alarmtimer based posix timers simpler. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org> Link: http://lkml.kernel.org/r/20170530211656.641222072@linutronix.de
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r--include/linux/posix-timers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 908048f488ae..8f9cca390cdb 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -56,6 +56,7 @@ struct cpu_timer_list {
* @list: List head for binding the timer to signals->posix_timers
* @t_hash: Entry in the posix timer hash table
* @it_lock: Lock protecting the timer
+ * @kclock: Pointer to the k_clock struct handling this timer
* @it_clock: The posix timer clock id
* @it_id: The posix timer id for identifying the timer
* @it_overrun: The overrun counter for pending signals
@@ -75,6 +76,7 @@ struct k_itimer {
struct list_head list;
struct hlist_node t_hash;
spinlock_t it_lock;
+ const struct k_clock *kclock;
clockid_t it_clock;
timer_t it_id;
int it_overrun;