提交 3ea936e8 编写于 作者: G Grissiom

[mempool] reset the thread->error before suspending thread

Time out result and other errors is recorded in thread->error. Dirty
error will screw up the error handling code after the thread has been
wake up.
上级 b2f35dcf
......@@ -356,6 +356,8 @@ void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time)
/* get current thread */
thread = rt_thread_self();
thread->error = RT_EOK;
/* need suspend thread */
rt_thread_suspend(thread);
rt_list_insert_after(&(mp->suspend_thread), &(thread->tlist));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册