[Kernel] Add thread detach for system thread

This commit is contained in:
Bernard Xiong 2019-02-07 23:49:46 +08:00
parent 6fea6f7b71
commit 25988d30d9
1 changed files with 2 additions and 0 deletions

View File

@ -193,6 +193,8 @@ void rt_thread_idle_excute(void)
/* if it's a system object, not delete it */ /* if it's a system object, not delete it */
if (rt_object_is_systemobject((rt_object_t)thread) == RT_TRUE) if (rt_object_is_systemobject((rt_object_t)thread) == RT_TRUE)
{ {
/* detach this object */
rt_object_detach((rt_object_t)thread);
/* unlock scheduler */ /* unlock scheduler */
rt_exit_critical(); rt_exit_critical();