Optimize the tick computation in the following ways:
1. Use relative time rather than absolute time
2. Replace multiplication/division pair with just multiplication
or division:
"* 1000000ULL / OS_TICK_FREQ" -> "* US_IN_TICK"
"* OS_TICK_FREQ / 1000000" -> "/ US_IN_TICK"
Move the function "mbed_get_a9_tick_irqn()" declared in os_tick.h
to SysTimer.h so it does not get overridden when RTX is updated.
This function was originally added in:
3d3e89097d
Fixes for RZ_A1H issue 6543
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"