Skip to content

sys/event: add event_sync()#20916

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/event_sync_mainline
Oct 21, 2024
Merged

sys/event: add event_sync()#20916
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/event_sync_mainline

Conversation

@derMihai
Copy link
Copy Markdown
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
@derMihai derMihai force-pushed the mir/event_sync_mainline branch from 48aabd2 to bd5f09c Compare October 17, 2024 13:26
@benpicco benpicco requested a review from fabian18 October 17, 2024 13:47
@riot-ci
Copy link
Copy Markdown

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
@derMihai derMihai force-pushed the mir/event_sync_mainline branch from a2e282a to 9996909 Compare October 18, 2024 11:14
@kaspar030
Copy link
Copy Markdown
Contributor

kaspar030 commented Oct 18, 2024

Simple but useful. I like. 👍

@benpicco benpicco added this pull request to the merge queue Oct 21, 2024
Merged via the queue into RIOT-OS:master with commit c48247f Oct 21, 2024
@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 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