diff options
| author | [email protected] <[email protected]> | 2012-12-26 00:29:42 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-12-26 00:29:42 +0000 |
| commit | ef5c47e6840a2d2cd986f4ecfdde87c9148375b2 (patch) | |
| tree | 401d4b4000b3b9f9c210861cd9cc0dd9613d95f0 /components/drivers/src/completion.c | |
| parent | f29cfc5e79b11acb28c00d870764bc0afe586a39 (diff) | |
fixed the coding style in components/drivers/src
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2529 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/drivers/src/completion.c')
| -rw-r--r-- | components/drivers/src/completion.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/components/drivers/src/completion.c b/components/drivers/src/completion.c index de3101375d..8fd52e1bba 100644 --- a/components/drivers/src/completion.c +++ b/components/drivers/src/completion.c @@ -60,7 +60,8 @@ rt_err_t rt_completion_wait(struct rt_completion *completion, /* suspend thread */ rt_thread_suspend(thread); /* add to suspended list */ - rt_list_insert_before(&(completion->suspended_list), &(thread->tlist)); + rt_list_insert_before(&(completion->suspended_list), + &(thread->tlist)); /* current context checking */ RT_DEBUG_NOT_IN_INTERRUPT; @@ -69,7 +70,9 @@ rt_err_t rt_completion_wait(struct rt_completion *completion, if (timeout > 0) { /* reset the timeout of thread timer and start it */ - rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, &timeout); + rt_timer_control(&(thread->thread_timer), + RT_TIMER_CTRL_SET_TIME, + &timeout); rt_timer_start(&(thread->thread_timer)); } /* enable interrupt */ @@ -110,8 +113,10 @@ void rt_completion_done(struct rt_completion *completion) struct rt_thread *thread; /* get thread entry */ - thread = rt_list_entry(completion->suspended_list.next, struct rt_thread, tlist); - + thread = rt_list_entry(completion->suspended_list.next, + struct rt_thread, + tlist); + /* resume it */ rt_thread_resume(thread); rt_hw_interrupt_enable(level); |
