Open
Conversation
kaspar030
reviewed
Jan 29, 2026
| _update_head_offset(evtimer); | ||
| _add_event_to_list(evtimer, event); | ||
| /* drain zero-offset head immediately */ | ||
| if (evtimer->events && evtimer->events->offset == 0) { |
Contributor
There was a problem hiding this comment.
I wouldn't want this to execute here (in calling context) without debate. It breaks the (maybe implicit) assumption that evtimer handlers are executed in the timer isr.
Contributor
Author
|
More investigation shows that it works with increasing: Confusing to me is that a timer offset of 1 works, but is also smaller than the default value of RTT_MIN_OFFSET. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Something is weird in the
evtimer. When a 0 offset event is added it seems like the timer IRQ does not fire.I got the fix from AI actually 😅.
But I noticed in development that sometimes an event with 0 offset is stuck in the
_nib_evtimerwhich prevents any further events.This is not the case on
native, but onsame54-xpro.Testing procedure
Added a test in
tests/sys/evtimerWithout the fix the 0 offset event does not trigger.Try to run it with the fix and it triggers.
Issues/PRs references