diff options
| author | dzzxzz <[email protected]> | 2011-09-21 03:56:42 +0000 |
|---|---|---|
| committer | dzzxzz <[email protected]> | 2011-09-21 03:56:42 +0000 |
| commit | c0f80bdf9a7fc66776fcb1ab5f94ef6af06fd17f (patch) | |
| tree | bb688f8017547fe23cb2879b85090f84f8b4f5c1 /src/clock.c | |
| parent | fea7d02bfd41a73be2d4fb2c0ecfe2b8628be68b (diff) | |
cleanup kernel code
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1715 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/clock.c')
| -rw-r--r-- | src/clock.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/clock.c b/src/clock.c index f23ddc3279..e5cf3ea75c 100644 --- a/src/clock.c +++ b/src/clock.c @@ -1,7 +1,7 @@ /* * File : clock.c * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team + * COPYRIGHT (C) 2006 - 2011, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -31,7 +31,7 @@ extern void rt_timer_switch(void); * @ingroup SystemInit * */ -void rt_system_tick_init() +void rt_system_tick_init(void) { rt_tick = 0; } @@ -47,7 +47,7 @@ void rt_system_tick_init() * * @return current tick */ -rt_tick_t rt_tick_get() +rt_tick_t rt_tick_get(void) { /* return the global tick */ return rt_tick; @@ -70,9 +70,9 @@ void rt_tick_set(rt_tick_t tick) * This function will notify kernel there is one tick passed. Normally, * this function is invoked by clock ISR. */ -void rt_tick_increase() +void rt_tick_increase(void) { - struct rt_thread* thread; + struct rt_thread *thread; /* increase the global tick */ ++ rt_tick; @@ -87,10 +87,10 @@ void rt_tick_increase() thread->remaining_tick = thread->init_tick; /* yield */ - rt_thread_yield(); + rt_thread_yield(); } - /* check timer */ + /* check timer */ rt_timer_check(); } @@ -104,7 +104,7 @@ void rt_tick_increase() rt_tick_t rt_tick_from_millisecond(rt_uint32_t ms) { /* return the calculated tick */ - return (RT_TICK_PER_SECOND * ms+999) / 1000; + return (RT_TICK_PER_SECOND * ms + 999) / 1000; } /*@}*/ |
