convert the tabs to spaces in clock.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2501 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-12-20 07:34:48 +00:00
parent 0e40d55d9f
commit a810c1ae73
1 changed files with 23 additions and 23 deletions

View File

@ -49,8 +49,8 @@ void rt_system_tick_init(void)
*/
rt_tick_t rt_tick_get(void)
{
/* return the global tick */
return rt_tick;
/* return the global tick */
return rt_tick;
}
RTM_EXPORT(rt_tick_get);
@ -59,11 +59,11 @@ RTM_EXPORT(rt_tick_get);
*/
void rt_tick_set(rt_tick_t tick)
{
rt_base_t level;
rt_base_t level;
level = rt_hw_interrupt_disable();
rt_tick = tick;
rt_hw_interrupt_enable(level);
level = rt_hw_interrupt_disable();
rt_tick = tick;
rt_hw_interrupt_enable(level);
}
/**
@ -72,26 +72,26 @@ void rt_tick_set(rt_tick_t tick)
*/
void rt_tick_increase(void)
{
struct rt_thread *thread;
struct rt_thread *thread;
/* increase the global tick */
++ rt_tick;
/* increase the global tick */
++ rt_tick;
/* check time slice */
thread = rt_thread_self();
/* check time slice */
thread = rt_thread_self();
-- thread->remaining_tick;
if (thread->remaining_tick == 0)
{
/* change to initialized tick */
thread->remaining_tick = thread->init_tick;
-- thread->remaining_tick;
if (thread->remaining_tick == 0)
{
/* change to initialized tick */
thread->remaining_tick = thread->init_tick;
/* yield */
rt_thread_yield();
}
/* yield */
rt_thread_yield();
}
/* check timer */
rt_timer_check();
/* check timer */
rt_timer_check();
}
/**
@ -103,8 +103,8 @@ void rt_tick_increase(void)
*/
rt_tick_t rt_tick_from_millisecond(rt_uint32_t ms)
{
/* return the calculated tick */
return (RT_TICK_PER_SECOND * ms + 999) / 1000;
/* return the calculated tick */
return (RT_TICK_PER_SECOND * ms + 999) / 1000;
}
RTM_EXPORT(rt_tick_from_millisecond);