diff --git a/src/mempool.c b/src/mempool.c index c9bcd7a45c..05904bfbc7 100644 --- a/src/mempool.c +++ b/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));