mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 22:42:40 +08:00
[kernel] 将rt_thread结构体改为显式继承rt_object (#7131)
This commit is contained in:
@@ -709,11 +709,11 @@ static void print_thread_info(struct rt_thread* thread, int maxlen)
|
||||
|
||||
#ifdef RT_USING_SMP
|
||||
if (thread->oncpu != RT_CPU_DETACHED)
|
||||
rt_kprintf("%-*.*s %3d %3d ", maxlen, RT_NAME_MAX, thread->name, thread->oncpu, thread->current_priority);
|
||||
rt_kprintf("%-*.*s %3d %3d ", maxlen, RT_NAME_MAX, thread->parent.name, thread->oncpu, thread->current_priority);
|
||||
else
|
||||
rt_kprintf("%-*.*s N/A %3d ", maxlen, RT_NAME_MAX, thread->name, thread->current_priority);
|
||||
rt_kprintf("%-*.*s N/A %3d ", maxlen, RT_NAME_MAX, thread->parent.name, thread->current_priority);
|
||||
#else
|
||||
rt_kprintf("%-*.*s %3d ", maxlen, RT_NAME_MAX, thread->name, thread->current_priority);
|
||||
rt_kprintf("%-*.*s %3d ", maxlen, RT_NAME_MAX, thread->parent.name, thread->current_priority);
|
||||
#endif /*RT_USING_SMP*/
|
||||
|
||||
stat = (thread->stat & RT_THREAD_STAT_MASK);
|
||||
@@ -787,7 +787,7 @@ long list_process(void)
|
||||
|
||||
thread = threads[index];
|
||||
level = rt_hw_interrupt_disable();
|
||||
if ((thread->type & ~RT_Object_Class_Static) != RT_Object_Class_Thread)
|
||||
if ((thread->parent.type & ~RT_Object_Class_Static) != RT_Object_Class_Thread)
|
||||
{
|
||||
rt_hw_interrupt_enable(level);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user