mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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
This commit is contained in:
parent
80105cd0e6
commit
d97bb75ddd
3 changed files with 8 additions and 3 deletions
|
@ -324,6 +324,8 @@ static int posix_cpu_timer_create(struct k_itimer *new_timer)
|
|||
if (CPUCLOCK_WHICH(new_timer->it_clock) >= CPUCLOCK_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
new_timer->kclock = &clock_posix_cpu;
|
||||
|
||||
INIT_LIST_HEAD(&new_timer->it.cpu.entry);
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue