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:
commit
616e6a526a
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user