mirror of https://github.com/ARMmbed/mbed-os.git
Remove unnecessary low power ticker rescheduling
Schedule the next OS tick inside of the ticker interrupt rather than in the systick interrupt. Scheduling this while the ticker is dispatching prevents an unnecissary rescheduling since this rescheduling is done anyway when dispatching is finished. This is particularly useful for the low power ticker on devices with LPTICKER_DELAY_TICKS set to a non-zero value. This is because the low power ticker cannot be reschduled immediately and needs to fall back onto the microsecond ticker which temporarily locks deep sleep. Note - the optimization in this commit is made possible by the commit: "Don't reschedule ticker while dispatching"pull/7600/head
parent
e69ecaab57
commit
05d33b068d
|
@ -178,6 +178,7 @@ void SysTimer::handler()
|
|||
} else {
|
||||
_set_irq_pending();
|
||||
_increment_tick();
|
||||
schedule_tick();
|
||||
}
|
||||
|
||||
core_util_critical_section_exit();
|
||||
|
|
|
@ -63,7 +63,7 @@ void OS_Tick_Disable (void)
|
|||
/// Acknowledge System Timer IRQ.
|
||||
void OS_Tick_AcknowledgeIRQ (void)
|
||||
{
|
||||
os_timer->schedule_tick();
|
||||
|
||||
}
|
||||
|
||||
/// Get System Timer count.
|
||||
|
|
Loading…
Reference in New Issue