diff options
| author | Bernard Xiong <[email protected]> | 2018-08-30 20:27:45 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2018-08-30 20:27:45 +0800 |
| commit | efe4523132169a4f28b84b1820a1a71d35118965 (patch) | |
| tree | ac0408e0933701a08122a3d0cd4dc6687a96316e /src/idle.c | |
| parent | 240451b978d5775f0e936ed57d682ca1ccee604d (diff) | |
[Kernel] move module tolibc/libdl.
Diffstat (limited to 'src/idle.c')
| -rw-r--r-- | src/idle.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/idle.c b/src/idle.c index d6c2f98a49..1aca33d3e4 100644 --- a/src/idle.c +++ b/src/idle.c @@ -32,6 +32,10 @@ #include <rthw.h> #include <rtthread.h> +#ifdef RT_USING_MODULE +#include <dlmodule.h> +#endif + #if defined (RT_USING_HOOK) #ifndef RT_USING_IDLE_HOOK #define RT_USING_IDLE_HOOK @@ -158,7 +162,7 @@ void rt_thread_idle_excute(void) rt_base_t lock; rt_thread_t thread; #ifdef RT_USING_MODULE - rt_module_t module = RT_NULL; + struct rt_dlmodule *module = RT_NULL; #endif RT_DEBUG_NOT_IN_INTERRUPT; @@ -173,14 +177,10 @@ void rt_thread_idle_excute(void) struct rt_thread, tlist); #ifdef RT_USING_MODULE - /* get thread's parent module */ - module = (rt_module_t)thread->module_id; - - /* if the thread is module's main thread */ - if (module != RT_NULL && module->module_thread == thread) + module = (struct rt_dlmodule*)thread->module_id; + if (module) { - /* detach module's main thread */ - module->module_thread = RT_NULL; + dlmodule_destroy(module); } #endif /* remove defunct thread */ |
