提交 a535218b 编写于 作者: 还_没_想_好's avatar 还_没_想_好 提交者: mysterywolf

[shell]list_mutex show suspended Threads

上级 197ce2cd
...@@ -408,9 +408,9 @@ long list_mutex(void) ...@@ -408,9 +408,9 @@ long list_mutex(void)
maxlen = RT_NAME_MAX; maxlen = RT_NAME_MAX;
rt_kprintf("%-*.s owner hold suspend thread priority\n", maxlen, item_title); rt_kprintf("%-*.s owner hold priority suspend thread \n", maxlen, item_title);
object_split(maxlen); object_split(maxlen);
rt_kprintf(" -------- ---- -------------- --------\n"); rt_kprintf(" -------- ---- -------- --------------\n");
do do
{ {
...@@ -433,15 +433,30 @@ long list_mutex(void) ...@@ -433,15 +433,30 @@ long list_mutex(void)
rt_hw_interrupt_enable(level); rt_hw_interrupt_enable(level);
m = (struct rt_mutex *)obj; m = (struct rt_mutex *)obj;
rt_kprintf("%-*.*s %-8.*s %04d %d %d\n", if (!rt_list_isempty(&m->parent.suspend_thread))
{
rt_kprintf("%-*.*s %-8.*s %04d %8d %04d ",
maxlen, RT_NAME_MAX, maxlen, RT_NAME_MAX,
m->parent.parent.name, m->parent.parent.name,
RT_NAME_MAX, RT_NAME_MAX,
m->owner->name, m->owner->name,
m->hold, m->hold,
rt_list_len(&m->parent.suspend_thread), m->priority,
m->priority); rt_list_len(&m->parent.suspend_thread));
show_wait_queue(&(m->parent.suspend_thread));
rt_kprintf("\n");
}
else
{
rt_kprintf("%-*.*s %-8.*s %04d %8d %04d\n",
maxlen, RT_NAME_MAX,
m->parent.parent.name,
RT_NAME_MAX,
m->owner->name,
m->hold,
m->priority,
rt_list_len(&m->parent.suspend_thread));
}
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册