diff options
| author | [email protected] <[email protected]> | 2012-05-01 17:52:48 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-05-01 17:52:48 +0000 |
| commit | e01d425bf3fc423f837ac4b00fb3d90050fe7490 (patch) | |
| tree | 83887c6f85764d8355f8a9608281da7d6178ee34 /components/drivers | |
| parent | 30a2731d434593a0ee7549932d5950d40c8acb47 (diff) | |
add "thread->error = RT_EOK;" in rt_completion_wait
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2107 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/src/completion.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/drivers/src/completion.c b/components/drivers/src/completion.c index a2f9a3058b..220fc04a87 100644 --- a/components/drivers/src/completion.c +++ b/components/drivers/src/completion.c @@ -42,6 +42,9 @@ rt_err_t rt_completion_wait(struct rt_completion* completion, rt_int32_t timeout }
else
{
+ /* reset thread error number */ + thread->error = RT_EOK;
+
/* suspend thread */
rt_thread_suspend(thread);
/* add to suspended list */
@@ -92,7 +95,7 @@ void rt_completion_done(struct rt_completion* completion) /* get thread entry */
thread = rt_list_entry(completion->suspended_list.next, struct rt_thread, tlist);
-
+
/* resume it */
rt_thread_resume(thread);
rt_hw_interrupt_enable(level);
|
