1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/xtimer
Martine S. Lenders 212fe15786
xtimer: set now pointer correctly in _update_short_timers() loop
This fixes `xtimer` to use `xtimer_now64()` instead of `xtimer_now()`
for updating the `*now` variable during the iteration in
`_update_short_timers()` function. The same function is used to
initialize `*now` in `_timer_callback()` below.

While using `xtimer_now()` in this iteration step does not hinder the
proper execution of all timers in the short term timers (for those the
`xtimer` module only looks at the `start_time` member, not the
`long_start_time` member) at least for the current long term time window
(I did not test higher cases), it sets the `long_start_time` member to 0
for all timers following in the list of timers after this iteration
step. However, external modules that rely on this to be correct,
e.g. evtimer [1], fail their calculations when trying to compare to
the current value to `xtimer_now64()`.

[1] https://github.com/RIOT-OS/RIOT/blob/11f3d68/sys/evtimer/evtimer.c#L118-L121

Co-Authored-By: Cenk Gündoğan <mail+dev@gundogan.net>
2020-04-10 00:02:33 +02:00
..
Makefile sys: xtimer: introduce new timer subsystem 2015-08-25 13:20:35 +02:00
xtimer_core.c xtimer: set now pointer correctly in _update_short_timers() loop 2020-04-10 00:02:33 +02:00
xtimer.c core/mutex.c _mutex_lock uses an int pointer 2020-03-26 17:26:07 +01:00