Skip to content

sys/event/thread: optimize stack usage#21556

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/event_thread_opt
Jun 20, 2025
Merged

sys/event/thread: optimize stack usage#21556
benpicco merged 1 commit intoRIOT-OS:masterfrom
derMihai:mir/event_thread_opt

Conversation

@derMihai
Copy link
Copy Markdown
Contributor

Contribution description

event_wait_multi() always returns an event, so the event_loop_multi() can be rewritten s.t. it explicitly never returns. The compiler will optimize away any prologue/epilogue, saving stack and code space.

Testing procedure

Ran the sys/event_thread app on native64.

@derMihai derMihai requested a review from kaspar030 as a code owner June 20, 2025 14:38
@github-actions github-actions bot added the Area: sys Area: System label Jun 20, 2025
@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 Jun 20, 2025
@derMihai derMihai force-pushed the mir/event_thread_opt branch from 5133dd8 to 65dcaf7 Compare June 20, 2025 15:06
@benpicco benpicco added the Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation label Jun 20, 2025
@benpicco benpicco enabled auto-merge June 20, 2025 15:13
@riot-ci
Copy link
Copy Markdown

riot-ci commented Jun 20, 2025

Murdock results

✔️ PASSED

65dcaf7 sys/event/thread: optimize stack usage

Success Failures Total Runtime
10379 0 10379 16m:27s

Artifacts

@benpicco benpicco added this pull request to the merge queue Jun 20, 2025
Merged via the queue into RIOT-OS:master with commit 15cc7c4 Jun 20, 2025
27 checks passed
@Teufelchen1 Teufelchen1 added this to the Release 2025.07 milestone Jul 14, 2025
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 Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants