1
0
Эх сурвалжийг харах

Merge pull request #266 from grissiom/fix-mempool

[mempool] reset the thread->error before suspending thread
Bernard Xiong 11 жил өмнө
parent
commit
30d477a9f8
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 */
             thread = rt_thread_self();
 
+            thread->error = RT_EOK;
+
             /* need suspend thread */
             rt_thread_suspend(thread);
             rt_list_insert_after(&(mp->suspend_thread), &(thread->tlist));