Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions subsys/shell/modules/kernel_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ static int cmd_kernel_threads(const struct shell *shell,

shell_print(shell, "Scheduler: %u since last call", sys_clock_elapsed());
shell_print(shell, "Threads:");

#ifdef CONFIG_SMP
k_thread_foreach_unlocked(shell_tdata_dump, (void *)shell);
#else
k_thread_foreach(shell_tdata_dump, (void *)shell);
#endif
return 0;
}

Expand Down Expand Up @@ -184,7 +189,12 @@ static int cmd_kernel_stacks(const struct shell *shell,

ARG_UNUSED(argc);
ARG_UNUSED(argv);

#ifdef CONFIG_SMP
k_thread_foreach_unlocked(shell_stack_dump, (void *)shell);
#else
k_thread_foreach(shell_stack_dump, (void *)shell);
#endif

/* Placeholder logic for interrupt stack until we have better
* kernel support, including dumping arch-specific exception-related
Expand Down