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/event: add event_sync() #20916

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derMihai
Copy link
Contributor

Contribution description

In some cases it's useful to ensure forward progress in the event queue before continuing. This PR adds event_sync(), which blocks until the last event on the queue at the moment of calling this (if any) will have been processed, e.g.

event_post(queue, my_event);
// When event_sync() returns, my_event will have been processed.
event_sync();

Testing procedure

The unit test was updated accordingly.

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Oct 17, 2024
@Teufelchen1 Teufelchen1 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 17, 2024
sys/event/event.c Outdated Show resolved Hide resolved
@riot-ci
Copy link

riot-ci commented Oct 17, 2024

Murdock results

✔️ PASSED

9996909 sys/event: add event_sync()

Success Failures Total Runtime
10212 0 10214 18m:02s

Artifacts

@derMihai derMihai force-pushed the mir/event_sync_mainline branch 2 times, most recently from 8222b89 to a2e282a Compare October 18, 2024 08:56
sys/event/event.c Outdated Show resolved Hide resolved
@kaspar030
Copy link
Contributor

kaspar030 commented Oct 18, 2024

Simple but useful. I like. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: tests Area: tests and testing framework 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.

5 participants