Skip to content

Commit c77ddf4

Browse files
committed
list-thread命令针对多核添加bind core显示
1 parent f9c01e5 commit c77ddf4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/finsh/cmd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ long list_thread(void)
175175
maxlen = RT_NAME_MAX;
176176

177177
#ifdef RT_USING_SMP
178-
rt_kprintf("%-*.s cpu pri status sp stack size max used left tick error\n", maxlen, item_title); object_split(maxlen);
179-
rt_kprintf( " --- --- ------- ---------- ---------- ------ ---------- ---\n");
178+
rt_kprintf("%-*.s cpu bind pri status sp stack size max used left tick error\n", maxlen, item_title); object_split(maxlen);
179+
rt_kprintf( " --- ---- --- ------- ---------- ---------- ------ ---------- ---\n");
180180
#else
181181
rt_kprintf("%-*.s pri status sp stack size max used left tick error\n", maxlen, item_title); object_split(maxlen);
182182
rt_kprintf( " --- ------- ---------- ---------- ------ ---------- ---\n");
@@ -211,9 +211,9 @@ long list_thread(void)
211211

212212
#ifdef RT_USING_SMP
213213
if (thread->oncpu != RT_CPU_DETACHED)
214-
rt_kprintf("%-*.*s %3d %3d ", maxlen, RT_NAME_MAX, thread->name, thread->oncpu, thread->current_priority);
214+
rt_kprintf("%-*.*s %3d %3d %4d ", maxlen, RT_NAME_MAX, thread->name, thread->oncpu, thread->bind_cpu, thread->current_priority);
215215
else
216-
rt_kprintf("%-*.*s N/A %3d ", maxlen, RT_NAME_MAX, thread->name, thread->current_priority);
216+
rt_kprintf("%-*.*s N/A %3d %4d ", maxlen, RT_NAME_MAX, thread->name, thread->bind_cpu, thread->current_priority);
217217

218218
#else
219219
rt_kprintf("%-*.*s %3d ", maxlen, RT_NAME_MAX, thread->name, thread->current_priority);

0 commit comments

Comments
 (0)