1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/sys/xtimer
Joakim Nohlgård b365ab45cb sys/xtimer: Avoid race incrementing multiple periods in _timer_callback
On a fast CPU with a slow timer (e.g. XTIMER_SHIFT > 0) it is possible
that now == _xtimer_now() when spinning for the overflow. In the extreme
case When this happens _next_period() will be called more than once
until the timer overflows for real.

Fault observed in real life when running on a 32.768 kHz timer on a
~96 MHz clocked mulle (Kinetis K60, Cortex-M4). _next_period() was
called 9 times during the same ISR call before the 32 kHz timer
overflowed.
2015-09-30 10:21:33 +02:00
..
Makefile sys: xtimer: introduce new timer subsystem 2015-08-25 13:20:35 +02:00
xtimer_core.c sys/xtimer: Avoid race incrementing multiple periods in _timer_callback 2015-09-30 10:21:33 +02:00
xtimer.c sys/xtimer: rename _ms_to_sec -> _us_to_sec to reflect actual functionality 2015-09-28 14:23:16 +02:00