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

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

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

mguetschow
Copy link
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
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.

core/msg.c Outdated Show resolved Hide resolved
Copy link
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.

core/msg.c Outdated Show resolved Hide resolved
core/msg.c Outdated Show resolved Hide resolved
core/msg.c Outdated Show resolved Hide resolved
Copy link
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
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

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

core/msg.c Outdated Show resolved Hide resolved
@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
26 checks passed
@mguetschow
Copy link
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