diff options
| author | [email protected] <[email protected]> | 2012-11-28 14:24:22 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-11-28 14:24:22 +0000 |
| commit | ee11663d87e071b44b6ca741b30605bf273a4fed (patch) | |
| tree | f4560e37e9141364277384b0ea6757ad7b838041 /src/idle.c | |
| parent | 0f72824edaa18763738ba9064cd298cadcf251f8 (diff) | |
remove rt_current_module and user can use rt_module_unload to remove a module.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2458 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/idle.c')
| -rw-r--r-- | src/idle.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/idle.c b/src/idle.c index 372461bced..d0d23c0d6f 100644 --- a/src/idle.c +++ b/src/idle.c @@ -131,7 +131,9 @@ void rt_thread_idle_excute(void) #ifdef RT_USING_MODULE if (module != RT_NULL) - { + { + extern rt_err_t rt_module_destroy(rt_module_t module); + /* 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) ) @@ -139,9 +141,9 @@ void rt_thread_idle_excute(void) module->nref --; } - /* unload module */ + /* destroy module */ if (module->nref == 0) - rt_module_unload(module); + rt_module_destroy(module); } #endif } |
