remove thread dump
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@764 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
17e528db4f
commit
f419a1711b
|
@ -107,61 +107,6 @@ long list_thread(void)
|
|||
}
|
||||
FINSH_FUNCTION_EXPORT(list_thread, list thread);
|
||||
|
||||
#if 0
|
||||
long dump_thread(rt_thread_t tid)
|
||||
{
|
||||
rt_uint8_t *ptr;
|
||||
rt_uint32_t sp;
|
||||
rt_thread_t thread;
|
||||
|
||||
rt_kprintf(" thread pri status sp stack size max used left tick error\n");
|
||||
rt_kprintf("-------- ---- ------- ---------- ---------- ---------- ---------- ---\n");
|
||||
|
||||
thread = rt_thread_self();
|
||||
if ((thread == tid) || (tid == RT_NULL)) /* it's current thread */
|
||||
{
|
||||
ptr = (rt_uint8_t*)thread->stack_addr;
|
||||
while (*ptr == '#')ptr ++;
|
||||
sp = (rt_uint32_t)__current_sp();
|
||||
rt_kprintf("%-8s 0x%02x", thread->name, thread->current_priority);
|
||||
|
||||
if (thread->stat == RT_THREAD_READY) rt_kprintf(" ready ");
|
||||
else if (thread->stat == RT_THREAD_SUSPEND) rt_kprintf(" suspend");
|
||||
else if (thread->stat == RT_THREAD_INIT) rt_kprintf(" init ");
|
||||
|
||||
rt_kprintf(" 0x%08x 0x%08x 0x%08x 0x%08x %03d\n",
|
||||
thread->stack_size + ((rt_uint32_t)thread->stack_addr - sp),
|
||||
thread->stack_size,
|
||||
thread->stack_size - ((rt_uint32_t) ptr - (rt_uint32_t)thread->stack_addr),
|
||||
thread->remaining_tick,
|
||||
thread->error);
|
||||
}
|
||||
else
|
||||
{
|
||||
thread = tid;
|
||||
sp = (rt_uint32_t)thread->sp;
|
||||
|
||||
ptr = (rt_uint8_t*)thread->stack_addr;
|
||||
while (*ptr == '#')ptr ++;
|
||||
|
||||
rt_kprintf("%-8s 0x%02x", thread->name, thread->current_priority);
|
||||
|
||||
if (thread->stat == RT_THREAD_READY) rt_kprintf(" ready ");
|
||||
else if (thread->stat == RT_THREAD_SUSPEND) rt_kprintf(" suspend");
|
||||
else if (thread->stat == RT_THREAD_INIT) rt_kprintf(" init ");
|
||||
|
||||
rt_kprintf(" 0x%08x 0x%08x 0x%08x 0x%08x %03d\n",
|
||||
thread->stack_size + ((rt_uint32_t)thread->stack_addr - sp),
|
||||
thread->stack_size,
|
||||
thread->stack_size - ((rt_uint32_t) ptr - (rt_uint32_t)thread->stack_addr),
|
||||
thread->remaining_tick,
|
||||
thread->error);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void show_wait_queue(struct rt_list_node* list)
|
||||
{
|
||||
struct rt_thread *thread;
|
||||
|
|
|
@ -436,7 +436,13 @@ void finsh_system_init(void)
|
|||
shell = (struct finsh_shell*)rt_malloc(sizeof(struct finsh_shell));
|
||||
#else
|
||||
shell = &_shell;
|
||||
#endif
|
||||
#endif
|
||||
if (shell == RT_NULL)
|
||||
{
|
||||
rt_kprintf("no memory for shell\n");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(shell, 0, sizeof(struct finsh_shell));
|
||||
|
||||
rt_sem_init(&(shell->rx_sem), "shrx", 0, 0);
|
||||
|
|
Loading…
Reference in New Issue