summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-12-20 07:34:48 +0000
committer[email protected] <[email protected]>2012-12-20 07:34:48 +0000
commita810c1ae73b1b5d1e618b9282b196b4212b13ddf (patch)
tree204b4397d834e4d4f3dace6dba4ce418e4e9920e /src
parent0e40d55d9f6894aec2dfc844e8ea89756b0306fe (diff)
convert the tabs to spaces in clock.c
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2501 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src')
-rw-r--r--src/clock.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/clock.c b/src/clock.c
index 7e68d20899..436ab3a8a8 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -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);