1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/ztimer
Kaspar Schleiser 88b509e56d ztimer: correctly unset timer->next (fix ztimer_is_set())
ztimer's machinery depends on figuring out if a timer is currently set
or not. It does that using _is_set(), which is also exposed as
ztimer_is_set().
Now when a timer expired and got taken of the timer queue using
_now_next(), the `next` pointer wasn't unset. This caused _is_set() to
wrongly return `true` for that timer.
Internally in ztimer, this didn't cause breakage, just an unnecessary
iteration of the timer queue by _delete_timer_from_list().
But this also broke the public ztimer_is_set().

This commit fixes the issue by correctly NULLing the timer's `next`
pointer when the timer triggers.
2021-04-22 11:06:04 +02:00
..
auto_init.c sys/ztimer: rename required_pm_mode to block_pm_mode 2021-04-06 16:57:53 +02:00
convert_frac.c ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
convert_muldiv64.c sys/ztimer: uncrustify 2020-05-11 16:43:50 +02:00
convert_shift.c sys/ztimer: add missing inttypes.h includes 2020-11-26 13:43:13 +01:00
convert.c sys/ztimer: add missing inttypes.h includes 2020-11-26 13:43:13 +01:00
core.c ztimer: correctly unset timer->next (fix ztimer_is_set()) 2021-04-22 11:06:04 +02:00
Kconfig Merge pull request #16172 from kfessel/p-zimer-sec 2021-04-02 08:32:38 +02:00
Makefile sys/ztimer: add ztimer_periodic 2020-09-29 23:04:39 +02:00
Makefile.dep Merge pull request #16172 from kfessel/p-zimer-sec 2021-04-02 08:32:38 +02:00
mock.c sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
overhead.c sys/ztimer: make ztimer_overhead() return signed value (int32_t) 2020-03-10 12:23:33 +01:00
periodic.c sys/*: remove unused assert.h include 2020-10-22 11:29:27 +02:00
periph_ptp.c sys/ztimer: add periph_ptp backend 2021-03-28 15:50:19 +02:00
periph_rtc.c ztimer/periph_rtc: intialize struct tm to avoid TZ and IDST problems 2021-04-01 18:19:15 +02:00
periph_rtt.c sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
periph_timer.c ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
util.c ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
xtimer2ztimer.cocci sys/ztimer: add coccinelle script for xtimer -> ztimer conversion 2020-03-04 12:44:02 +01:00