1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

Merge pull request #20924 from Enoch247/fix-ztimer-timer-reschedule

sys/ztimer: fix re-scheduling of timers
This commit is contained in:
Marian Buschsieweke 2024-10-18 21:25:33 +00:00 committed by GitHub
commit 616e6a526a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,15 +193,7 @@ uint32_t ztimer_set(ztimer_clock_t *clock, ztimer_t *timer, uint32_t val)
timer->base.offset = val; timer->base.offset = val;
_add_entry_to_list(clock, &timer->base); _add_entry_to_list(clock, &timer->base);
if (clock->list.next == &timer->base) { _ztimer_update(clock);
#ifdef MODULE_ZTIMER_EXTEND
if (clock->max_value < UINT32_MAX) {
val = _min_u32(val, clock->max_value >> 1);
}
DEBUG("ztimer_set(): %p setting %" PRIu32 "\n", (void *)clock, val);
#endif
clock->ops->set(clock, val);
}
irq_restore(state); irq_restore(state);