diff options
| author | bernard.xiong <[email protected]> | 2010-03-20 23:52:47 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-03-20 23:52:47 +0000 |
| commit | f459d4811ed8c681391b3fbc873fe8db4128cae6 (patch) | |
| tree | ac4a8e0b664846dd76d2b36ac5cecdfe6b62926d /src/thread.c | |
| parent | 911d17912560a274f1faef33a09882406ab5190a (diff) | |
change the errno of rt_thread_delay/sleep to RT_EOK.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@520 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c index a9bfd91144..8a2f8a7844 100644 --- a/src/thread.c +++ b/src/thread.c @@ -18,6 +18,7 @@ * 2006-09-03 Bernard change rt_timer_delete to rt_timer_detach * 2006-09-03 Bernard implement rt_thread_detach * 2008-02-16 Bernard fix the rt_thread_timeout bug + * 2010-03-21 Bernard change the errno of rt_thread_delay/sleep to RT_EOK. */ #include <rtthread.h> @@ -405,6 +406,10 @@ rt_err_t rt_thread_sleep (rt_tick_t tick) rt_schedule(); + /* clear error number of this thread to RT_EOK */ + if (thread->error == -RT_ETIMEOUT) + thread->error = RT_EOK; + return RT_EOK; } |
