Skip to content

Commit

Permalink
Merge pull request #20924 from Enoch247/fix-ztimer-timer-reschedule
Browse files Browse the repository at this point in the history
sys/ztimer: fix re-scheduling of timers
  • Loading branch information
maribu authored Oct 18, 2024
2 parents 5b23bfb + 45942f6 commit 616e6a5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sys/ztimer/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,7 @@ uint32_t ztimer_set(ztimer_clock_t *clock, ztimer_t *timer, uint32_t val)

timer->base.offset = val;
_add_entry_to_list(clock, &timer->base);
if (clock->list.next == &timer->base) {
#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);
}
_ztimer_update(clock);

irq_restore(state);

Expand Down

0 comments on commit 616e6a5

Please sign in to comment.