diff options
| author | Bernard Xiong <[email protected]> | 2014-04-16 11:53:40 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2014-04-16 11:53:40 +0800 |
| commit | 30d477a9f8dfe2ef431028a8f2956ab2977f308e (patch) | |
| tree | a96fbbc0d08166958a88154a11550750496680c6 | |
| parent | 3b6198275b4ad6322d4841a136c34293bd1e642c (diff) | |
| parent | a78e42a7c8b63ef099ef5a3c1c019c4aa227b5ca (diff) | |
Merge pull request #266 from grissiom/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)); |
