Skip to content

core/msg: re-enable IRQs before printing for highlevel_stdio#21047

Merged
maribu merged 2 commits intoRIOT-OS:masterfrom
mguetschow:msg-queue-print
Nov 28, 2024
Merged

core/msg: re-enable IRQs before printing for highlevel_stdio#21047
maribu merged 2 commits intoRIOT-OS:masterfrom
mguetschow:msg-queue-print

Conversation

@mguetschow
Copy link
Copy Markdown
Contributor

Contribution description

highlevel_stdio such as usb-cdc-acm seems to require IRQs to be enabled for printing, but msg_queue_print() currently prints with IRQs disabled. This PR fixes that by copying the message queue information to the stack before re-enabling IRQs.

Testing procedure

make -C tests/core/msg_queue_print BOARD=feather-nrf52840-sense flash test

hangs on master, passes with this PR

Changes tested on native and seeedstudio-xiao-nrf52840.

Issues/PRs references

Encountered while testing for #20980.

@github-actions github-actions bot added the Area: core Area: RIOT kernel. Handle PRs marked with this with care! label Nov 26, 2024
Copy link
Copy Markdown
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is output on nrf52840dongle now for this test, but compared to master on native the numbers appear to be random.

Copy link
Copy Markdown
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it works. Please squash.

Copy link
Copy Markdown
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI has a nitpick. Please squash at will

@mguetschow
Copy link
Copy Markdown
Contributor Author

I've changed the test to also check the msg_queue copying in other cases and it works at least on native, but please double-check.

@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 Nov 27, 2024
@riot-ci
Copy link
Copy Markdown

riot-ci commented Nov 27, 2024

Murdock results

✔️ PASSED

e843514 tests/core/msg_queue_print: test for special cases

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

Artifacts

@maribu maribu added this pull request to the merge queue Nov 28, 2024
Merged via the queue into RIOT-OS:master with commit af89824 Nov 28, 2024
@mguetschow
Copy link
Copy Markdown
Contributor Author

Thanks all!

@mguetschow mguetschow deleted the msg-queue-print branch November 29, 2024 11:00
@MrKevinWeiss MrKevinWeiss added this to the Release 2025.01 milestone Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: core Area: RIOT kernel. Handle PRs marked with this with care! 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.

6 participants