From 143b14bb4fb779437fdeb8369e42fbb81db4a5fd Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Fri, 23 Aug 2024 15:57:38 +0800 Subject: [PATCH] shell: modules: kernel: print cpu_mask when available Dump the `cpu_mask` of threads when available. Signed-off-by: Yong Cong Sin Signed-off-by: Yong Cong Sin --- subsys/shell/modules/kernel_service.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subsys/shell/modules/kernel_service.c b/subsys/shell/modules/kernel_service.c index 246120f9234..37ea7bdb659 100644 --- a/subsys/shell/modules/kernel_service.c +++ b/subsys/shell/modules/kernel_service.c @@ -127,6 +127,10 @@ static void shell_tdata_dump(const struct k_thread *cthread, void *user_data) k_thread_state_str(thread, state_str, sizeof(state_str)), thread->entry.pEntry); +#ifdef CONFIG_SCHED_CPU_MASK + shell_print(sh, "\tcpu_mask: 0x%x", thread->base.cpu_mask); +#endif /* CONFIG_SCHED_CPU_MASK */ + #ifdef CONFIG_THREAD_RUNTIME_STATS ret = 0;