diff options
| author | qiuyiuestc <[email protected]> | 2010-11-17 16:17:07 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-11-17 16:17:07 +0000 |
| commit | d240423d7422b51e10942fab00a2a34ed4c32e6f (patch) | |
| tree | d6fae680f474d7494e5d522970aeb36a740502bf /src/idle.c | |
| parent | b2fb4be8111ae46ca64e4b135cfd47895900a0e1 (diff) | |
construct module symbol table
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1053 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/idle.c')
| -rw-r--r-- | src/idle.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/idle.c b/src/idle.c index 82ed7cec49..2c0d9e0ba8 100644 --- a/src/idle.c +++ b/src/idle.c @@ -129,13 +129,15 @@ void rt_thread_idle_excute(void) if((module->module_thread == RT_NULL) && rt_list_isempty(&module->module_object[RT_Object_Class_Thread].object_list) ) { - /* unload module */ - rt_module_unload(module); + module->nref--; } } -#endif //RT_USING_MODULE + + /* unload module */ + if(module->nref == 0) rt_module_unload(module); +#endif } -#endif //RT_USING_HEAP +#endif } static void rt_thread_idle_entry(void* parameter) |
