diff options
| author | Bernard Xiong <[email protected]> | 2014-04-16 11:53:48 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2014-04-16 11:53:48 +0800 |
| commit | 61712bbd13b7c820307f0570d49f1bc0fc6b857a (patch) | |
| tree | 248758eb1b58a4583ddedcfe20f8d8525529ffb7 | |
| parent | b2f35dcf3f930087104e2bb36845d50a6931a15d (diff) | |
| parent | 3ea936e80c5a71abfffa2e184da762b1768334f9 (diff) | |
Merge pull request #267 from grissiom/stable-v1.2.x-fix-mempool
[mempool] reset the thread->error before suspending thread
| -rw-r--r-- | src/mempool.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)); |
