mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-20 22:42:40 +08:00
Merge pull request #4381 from mysterywolf/exit
[kernel] rt_thread_control() 关闭线程后增加rt_schedule调度
This commit is contained in:
@@ -14,18 +14,10 @@ void __rt_libc_exit(int status)
|
||||
{
|
||||
rt_thread_t self = rt_thread_self();
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
if (dlmodule_self())
|
||||
{
|
||||
dlmodule_exit(status);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (self != RT_NULL)
|
||||
{
|
||||
rt_kprintf("thread:%s exit:%d!\n", self->name, status);
|
||||
rt_thread_suspend(self);
|
||||
rt_schedule();
|
||||
rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user