kernel: tick-sched: Add API to get the next wakeup for a CPU
Add get_next_event_cpu to get the next wakeup time for the CPU. This is used by the sleep driver if it has to query the next wakeup for a CPU other than the thread that its running on. Change-Id: I889de90928b9b1e51a51b2f9205d7865facfcc20 Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
This commit is contained in:
parent
851db0283c
commit
930e2352bf
2 changed files with 6 additions and 0 deletions
|
|
@ -304,4 +304,5 @@ static inline void tick_nohz_task_switch(void)
|
|||
__tick_nohz_task_switch();
|
||||
}
|
||||
|
||||
ktime_t *get_next_event_cpu(unsigned int cpu);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1342,3 +1342,8 @@ int tick_check_oneshot_change(int allow_nohz)
|
|||
tick_nohz_switch_to_nohz();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ktime_t *get_next_event_cpu(unsigned int cpu)
|
||||
{
|
||||
return &(per_cpu(tick_cpu_device, cpu).evtdev->next_event);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue