提交 c15a7858 编写于 作者: C chenchaoqun

[fix] thread control bug about RT_THREAD_CTRL_CLOSE command

上级 82ac7d1e
......@@ -679,9 +679,17 @@ rt_err_t rt_thread_control(rt_thread_t thread, int cmd, void *arg)
case RT_THREAD_CTRL_STARTUP:
return rt_thread_startup(thread);
#ifdef RT_USING_HEAP
case RT_THREAD_CTRL_CLOSE:
if (rt_object_is_systemobject((rt_object_t)thread) == RT_TRUE)
{
return rt_thread_detach(thread);
}
#ifdef RT_USING_HEAP
else
{
return rt_thread_delete(thread);
}
#endif
#ifdef RT_USING_SMP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册