Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/ztimer: fix re-scheduling of timers #20924

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading