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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

6fed8ec tests/core/msg_queue_print: test for special cases

Success Failures Total Runtime
10249 0 10249 19m:23s

Artifacts

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.

5 participants