-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tests/core/thread_msg: lower thread priority for consistent output order #20989
Conversation
OK, I think I can explain the behavior: The threads are created with If If however I think we should also drop the |
Thanks, that at least explains the difference between both tested boards. However, I still don't understand why changing the thread priority then fixes the order: If the Maybe the explanation is actually that the fancy
|
E.g. for UART with DMA they will cause IRQs, but I do believe that at this point the higher prio threads will already be running anyway. My mental model is for UART using DMA is:
In any case, relying on |
also drop THREAD_CREATE_WOUT_YIELD flag, since it is not sensible to use when creating lower-priority threads
aa137bc
to
149a26e
Compare
Okay, done, and directly squashed. |
Thanks! |
Contribution description
For some reason, the threads are (seemingly?) scheduled differently on
nrf52840dk
andfeather-nrf52840-sense
, at least the output order is not consistent. This PR changes the child threads to have a lower priority than the main thread so that "THREADS STARTED" is always printed first.Testing procedure
make -C tests/core/thread_msg BOARD=feather-nrf52840-sense flash test
fails on master, passes with this PR
Issues/PRs references
Encountered while working on #20980