未验证 提交 7471a665 编写于 作者: C cliff-cmc 提交者: GitHub

Update thread.c

上级 240961e8
......@@ -338,7 +338,7 @@ rt_err_t rt_thread_detach(rt_thread_t thread)
RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
RT_ASSERT(rt_object_is_systemobject((rt_object_t)thread));
if (thread->stat == RT_THREAD_CLOSE)
if ((thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_CLOSE)
return RT_EOK;
if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
......@@ -440,7 +440,7 @@ rt_err_t rt_thread_delete(rt_thread_t thread)
RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
RT_ASSERT(rt_object_is_systemobject((rt_object_t)thread) == RT_FALSE);
if (thread->stat == RT_THREAD_CLOSE)
if ((thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_CLOSE)
return RT_EOK;
if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册