소스 검색

Merge pull request #267 from grissiom/stable-v1.2.x-fix-mempool

[mempool] reset the thread->error before suspending thread
Bernard Xiong 12 년 전
부모
커밋
61712bbd13
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/mempool.c

+ 2 - 0
src/mempool.c

@@ -356,6 +356,8 @@ void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time)
             /* get current thread */
             /* get current thread */
             thread = rt_thread_self();
             thread = rt_thread_self();
 
 
+            thread->error = RT_EOK;
+
             /* need suspend thread */
             /* need suspend thread */
             rt_thread_suspend(thread);
             rt_thread_suspend(thread);
             rt_list_insert_after(&(mp->suspend_thread), &(thread->tlist));
             rt_list_insert_after(&(mp->suspend_thread), &(thread->tlist));