Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 930e2352 authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent 851db028
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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);
}