-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the bug
When 'kernel stacks' or 'kernel threads' commands are entered at the command prompt realtime performance is lost.
To Reproduce
- Enable shell, kernel extensions and thread/stack info. Specifically, the following must be defined;
CONFIG_INIT_STACKS, CONFIG_THREAD_MONITOR, CONFIG_THREAD_STACK_INFO - Setup short period secondary task which is dependent on external interrupt (e.g. to toggle a pin in response to incoming pin change)
- Compile (tested on STM32F429 build)
- At the command prompt type 'kernel stacks' or 'kernel threads'
- Observe that realtime response of other task is lost.
I think this is due to the k_spin_lock in kernel/thread.c::k_thread_foreach ... would it not be sufficient to just do a k_sched_lock here? Worst consequence would be incorrectly reported threads/stacks for the case that the printing task manipulated one of the, which it's not supposed to do anyway.
Expected behavior
Interrupt responding second task should continue to operate correctly.
Impact
What impact does this issue have on your progress (e.g., annoyance, showstopper)
Annoyance. Prevents use of kernel threads/kernel stacks commands on a realtime system.
Screenshots or console output
N/A
Environment (please complete the following information):
Linux, Zephyr SDC, 1.3.99, a4e950a