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:
bernard.xiong 2010-01-04 15:30:26 +00:00
parent 9b905b5443
commit 329c44a03f
1 changed files with 49 additions and 38 deletions

View File

@ -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;
}