From d97bb75ddd2f38068df01da8abf26df78756253c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 30 May 2017 23:15:44 +0200 Subject: 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 Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170530211656.641222072@linutronix.de --- include/linux/posix-timers.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/posix-timers.h') 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; -- cgit