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

event/timeout: event_timeout_set() enqueues immediately if timeout is zero #20870

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

derMihai
Copy link
Contributor

Contribution description

Currently, the following can result in event_B being executed before event_A:

event_timeout_set(event_A, 0);
event_post(event_queue, event_B);

I think this is unexpected behavior. Queuing an event with timeout zero should schedule the event for immediate execution. I therefore added a check in event_timeout_set() to immediately queue if the timeout is zero.

Testing procedure

I briefly tested this on native in the application I'm currently working on.

@derMihai derMihai requested a review from kaspar030 as a code owner September 25, 2024 08:09
@github-actions github-actions bot added the Area: sys Area: System label Sep 25, 2024
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 25, 2024
@riot-ci
Copy link

riot-ci commented Sep 25, 2024

Murdock results

✔️ PASSED

b7eee2c event/timeout: event_timeout_set() enqueues immediately if timeout is zero

Success Failures Total Runtime
10197 0 10197 18m:12s

Artifacts

@benpicco benpicco added this pull request to the merge queue Sep 25, 2024
Merged via the queue into RIOT-OS:master with commit 7f959f8 Sep 25, 2024
27 checks passed
@benpicco benpicco added this to the Release 2024.10 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants