[kernel] 将rt_thread结构体改为显式继承rt_object (#7131)

This commit is contained in:
Shicheng Chu
2023-04-04 09:06:27 -04:00
committed by GitHub
parent 8a52e65013
commit 93f3cb30e4
49 changed files with 126 additions and 145 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc, uintptr_t * sp)
rt_kprintf("\n");
print_stack_frame(sp);
rt_kprintf("exception pc => 0x%08x\n", epc);
rt_kprintf("current thread: %.*s\n", RT_NAME_MAX, tid->name);
rt_kprintf("current thread: %.*s\n", RT_NAME_MAX, tid->parent.name);
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
list_thread();
#endif
+1 -1
View File
@@ -131,7 +131,7 @@ extern struct rt_thread *rt_current_thread;
static char *_get_elf_name(size_t sepc)
{
return IN_USERSPACE ? rt_current_thread->name : "rtthread.elf";
return IN_USERSPACE ? rt_current_thread->parent.name : "rtthread.elf";
}
#endif /* RT_USING_SMART */
+2 -2
View File
@@ -220,7 +220,7 @@ void handle_user(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_hw_backtrace((uint32_t *)sp->s0_fp, sepc);
LOG_E("User Fault, killing thread: %s", rt_thread_self()->name);
LOG_E("User Fault, killing thread: %s", rt_thread_self()->parent.name);
EXIT_TRAP;
sys_exit(-1);
@@ -332,7 +332,7 @@ void handle_trap(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_kprintf("scause:0x%p,stval:0x%p,sepc:0x%p\n", scause, stval, sepc);
dump_regs(sp);
rt_kprintf("--------------Thread list--------------\n");
rt_kprintf("current thread: %s\n", rt_thread_self()->name);
rt_kprintf("current thread: %s\n", rt_thread_self()->parent.name);
extern struct rt_thread *rt_current_thread;
rt_kprintf("--------------Backtrace--------------\n");
+1 -1
View File
@@ -131,7 +131,7 @@ extern struct rt_thread *rt_current_thread;
static char *_get_elf_name(size_t sepc)
{
return IN_USERSPACE ? rt_current_thread->name : "rtthread.elf";
return IN_USERSPACE ? rt_current_thread->parent.name : "rtthread.elf";
}
#endif /* RT_USING_SMART */
+2 -2
View File
@@ -217,7 +217,7 @@ void handle_user(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_hw_backtrace((uint32_t *)sp->s0_fp, sepc);
LOG_E("User Fault, killing thread: %s", rt_thread_self()->name);
LOG_E("User Fault, killing thread: %s", rt_thread_self()->parent.name);
EXIT_TRAP;
sys_exit(-1);
@@ -344,7 +344,7 @@ void handle_trap(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_kprintf("scause:0x%p,stval:0x%p,sepc:0x%p\n", scause, stval, sepc);
dump_regs(sp);
rt_kprintf("--------------Thread list--------------\n");
rt_kprintf("current thread: %s\n", rt_thread_self()->name);
rt_kprintf("current thread: %s\n", rt_thread_self()->parent.name);
extern struct rt_thread *rt_current_thread;
rt_kprintf("--------------Backtrace--------------\n");