add suspend thread display on mempool command.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@285 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
9b905b5443
commit
329c44a03f
11
finsh/cmd.c
11
finsh/cmd.c
|
@ -234,10 +234,21 @@ int list_mempool()
|
|||
for (node = list->next; node != list; node = node->next)
|
||||
{
|
||||
mp = (struct rt_mempool*)rt_list_entry(node, struct rt_object, list);
|
||||
if (mp->suspend_thread_count > 0)
|
||||
{
|
||||
rt_kprintf("%-8s %04d %04d %04d %d:", mp->parent.name,
|
||||
mp->block_size, mp->block_total_count, mp->block_free_count,
|
||||
mp->suspend_thread_count);
|
||||
show_wait_queue(&(mp->suspend_thread));
|
||||
rt_kprintf("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
rt_kprintf("%-8s %04d %04d %04d %d\n", mp->parent.name,
|
||||
mp->block_size, mp->block_total_count, mp->block_free_count,
|
||||
mp->suspend_thread_count);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue