fixed the coding style in idle.c

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2503 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
dzzxzz@gmail.com 2012-12-20 07:55:05 +00:00
parent 7e159dfb76
commit 9f348578e7
1 changed files with 91 additions and 85 deletions

View File

@ -78,7 +78,9 @@ void rt_thread_idle_excute(void)
if (!rt_list_isempty(&rt_thread_defunct)) if (!rt_list_isempty(&rt_thread_defunct))
{ {
/* get defunct thread */ /* get defunct thread */
thread = rt_list_entry(rt_thread_defunct.next, struct rt_thread, tlist); thread = rt_list_entry(rt_thread_defunct.next,
struct rt_thread,
tlist);
#ifdef RT_USING_MODULE #ifdef RT_USING_MODULE
/* get thread's parent module */ /* get thread's parent module */
module = (rt_module_t)thread->module_id; module = (rt_module_t)thread->module_id;
@ -101,6 +103,7 @@ void rt_thread_idle_excute(void)
{ {
/* enable interrupt */ /* enable interrupt */
rt_hw_interrupt_enable(lock); rt_hw_interrupt_enable(lock);
return; return;
} }
} }
@ -136,7 +139,7 @@ void rt_thread_idle_excute(void)
/* if sub thread list and main thread are all empty */ /* if sub thread list and main thread are all empty */
if ((module->module_thread == RT_NULL) && if ((module->module_thread == RT_NULL) &&
rt_list_isempty(&module->module_object[RT_Object_Class_Thread].object_list) ) rt_list_isempty(&module->module_object[RT_Object_Class_Thread].object_list))
{ {
module->nref --; module->nref --;
} }
@ -174,9 +177,12 @@ void rt_thread_idle_init(void)
/* initialize thread */ /* initialize thread */
rt_thread_init(&idle, rt_thread_init(&idle,
"tidle", "tidle",
rt_thread_idle_entry, RT_NULL, rt_thread_idle_entry,
&rt_thread_stack[0], sizeof(rt_thread_stack), RT_NULL,
RT_THREAD_PRIORITY_MAX - 1, 32); &rt_thread_stack[0],
sizeof(rt_thread_stack),
RT_THREAD_PRIORITY_MAX - 1,
32);
/* startup */ /* startup */
rt_thread_startup(&idle); rt_thread_startup(&idle);