cleanup kernel code

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1715 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz
2011-09-21 03:56:42 +00:00
parent fea7d02bfd
commit c0f80bdf9a
17 changed files with 1012 additions and 1009 deletions
+8 -8
View File
@@ -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;
}
/*@}*/