未验证 提交 8da744a7 编写于 作者: mysterywolf's avatar mysterywolf 提交者: GitHub

[exit] 修复_exit函数条件分支未覆盖所有情况的问题 (#6239)

attach #6229
上级 c49c5a4d
......@@ -20,16 +20,18 @@ void __rt_libc_exit(int status)
if (self != RT_NULL)
{
LOG_W("thread:%s exit:%d!", self->name, status);
#ifdef RT_USING_PTHREADS
if(self->pthread_data != RT_NULL)
{
extern void pthread_exit(void *value);
pthread_exit((void *)status);
}
#else
LOG_E("thread:%s exit:%d!", self->name, status);
rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
else
#endif
{
rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册