tests/core/thread_msg: lower thread priority for consistent output order#20989
tests/core/thread_msg: lower thread priority for consistent output order#20989maribu merged 1 commit intoRIOT-OS:masterfrom
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
nrf52840dkandfeather-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 testfails on master, passes with this PR
Issues/PRs references
Encountered while working on #20980