Commit dd390052 authored by hongzha1 via Xenomai's avatar hongzha1 via Xenomai Committed by Jan Kiszka

cobalt/timer: dovetail: handle ONESHOT_STOPPED mode

Force the next tick to be programmed in the hardware as a result of
leaving the ONESHOT_STOPPED
Signed-off-by: default avatarhongzha1 <hongzhan.chen@intel.com>
parent 258c7744
......@@ -9,4 +9,8 @@ int pipeline_install_tick_proxy(void);
void pipeline_uninstall_tick_proxy(void);
struct xnsched;
inline bool pipeline_must_force_program_tick(struct xnsched *sched);
#endif /* !_COBALT_KERNEL_IPIPE_TICK_H */
......@@ -86,6 +86,11 @@ void xn_core_tick(struct clock_event_device *dummy) /* hard irqs off */
xnintr_core_clock_handler();
}
inline bool pipeline_must_force_program_tick(struct xnsched *sched)
{
return sched->lflags & XNTSTOP;
}
static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
{
struct clock_event_device *real_dev;
......@@ -107,6 +112,7 @@ static int proxy_set_oneshot_stopped(struct clock_event_device *proxy_dev)
xnlock_get_irqsave(&nklock, s);
sched = xnsched_current();
xntimer_stop(&sched->htimer);
sched->lflags |= XNTSTOP;
if (sched->lflags & XNIDLE) {
real_dev = dev->real_device;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment