diff options
| author | qiuyiuestc <[email protected]> | 2010-09-25 15:30:25 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-09-25 15:30:25 +0000 |
| commit | 7fd452b8a6859ff16762985fea8ee93b0a4dff86 (patch) | |
| tree | 929c71b69ea4498d9b7a98418dca7abd0140a499 /src/idle.c | |
| parent | 1b55b00533c3fff0661282e8ec17a86a2af0f675 (diff) | |
module update
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@946 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/idle.c')
| -rw-r--r-- | src/idle.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/idle.c b/src/idle.c index b9c8529da7..c8af8f905b 100644 --- a/src/idle.c +++ b/src/idle.c @@ -103,15 +103,7 @@ void rt_thread_idle_excute(void) { /* detach module's main thread */ module->module_thread = RT_NULL; - } - - /* if sub thread list and main thread are all enmpy */ - if((module->module_thread == RT_NULL) && - rt_list_isempty(&module->module_object[RT_Object_Class_Thread].object_list) ) - { - /* unload module */ - rt_module_unload(module); - } + } } #endif /* release thread's stack */ @@ -119,7 +111,20 @@ void rt_thread_idle_excute(void) /* delete thread object */ rt_object_delete((rt_object_t)thread); + +#ifdef RT_USING_MODULE + if(module != RT_NULL) + { + /* if sub thread list and main thread are all empty */ + if((module->module_thread == RT_NULL) && + rt_list_isempty(&module->module_object[RT_Object_Class_Thread].object_list) ) + { + /* unload module */ + rt_module_unload(module); + } + } } +#endif #endif } |
