diff options
| author | qiuyiuestc <[email protected]> | 2010-04-20 17:00:51 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-04-20 17:00:51 +0000 |
| commit | 3baab7b053b4ead6c77721de8effafd2e46223be (patch) | |
| tree | 11a42cbb91d17687c3f0f9124dc14b0d7da6e244 /components | |
| parent | 760349dd5e34cc154c7eac2298c6d86b7658f756 (diff) | |
module developing
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@660 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
| -rw-r--r-- | components/finsh/cmd.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 3de9fdc742..a686ab3def 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -357,15 +357,13 @@ int list_module(void) module->stack_size); tlist = &module->module_object[RT_Object_Class_Thread].object_list; - if(tlist->next != tlist) - { - rt_kprintf(" sub-thread pri status sp stack size max used left tick error\n"); - rt_kprintf("-------- ---- ------- ---------- ---------- ---------- ---------- ---\n"); - } - + + rt_kprintf(" sub-thread pri status sp stack size max used left tick error\n"); + rt_kprintf("-------- ---- ------- ---------- ---------- ---------- ---------- ---\n"); + for (tnode = tlist->next; tnode != tlist; tnode = tnode->next) { - thread = rt_list_entry(tnode, struct rt_thread, tlist); + thread = rt_list_entry(tnode, struct rt_thread, list); rt_kprintf("%-8s 0x%02x", thread->name, thread->current_priority); if (thread->stat == RT_THREAD_READY) rt_kprintf(" ready "); |
