From 405678552dd1aeaf6755d4878b373a5bc4fa1042 Mon Sep 17 00:00:00 2001 From: dzzxzz Date: Mon, 19 Sep 2011 07:15:31 +0000 Subject: cleanup code in ipc.c and idle.c git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1713 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/idle.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/idle.c') diff --git a/src/idle.c b/src/idle.c index 7bda4dc69b..cc03bd499d 100644 --- a/src/idle.c +++ b/src/idle.c @@ -1,7 +1,7 @@ /* * File : idle.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 @@ -83,7 +83,7 @@ void rt_thread_idle_excute(void) module = (rt_module_t)thread->module_id; /* if the thread is module's main thread */ - if(module != RT_NULL && module->module_thread == thread) + if (module != RT_NULL && module->module_thread == thread) { /* detach module's main thread */ module->module_thread = RT_NULL; @@ -117,7 +117,7 @@ void rt_thread_idle_excute(void) #ifdef RT_USING_HEAP #if defined(RT_USING_MODULE) && defined(RT_USING_SLAB) /* the thread belongs to an application module */ - if(thread->flags & RT_OBJECT_FLAG_MODULE) + if (thread->flags & RT_OBJECT_FLAG_MODULE) rt_module_free((rt_module_t)thread->module_id, thread->stack_addr); else #endif @@ -128,10 +128,10 @@ void rt_thread_idle_excute(void) #endif #ifdef RT_USING_MODULE - if(module != RT_NULL) + if (module != RT_NULL) { /* 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) ) { module->nref--; @@ -139,7 +139,7 @@ void rt_thread_idle_excute(void) } /* unload module */ - if(module->nref == 0) rt_module_unload(module); + if (module->nref == 0) rt_module_unload(module); #endif } } @@ -164,7 +164,7 @@ static void rt_thread_idle_entry(void* parameter) * * @note this function must be invoked when system init. */ -void rt_thread_idle_init() +void rt_thread_idle_init(void) { /* init thread */ rt_thread_init(&idle, -- cgit v1.3.1