From cea21370a40d8b9ace858c477d5cedf214cdf520 Mon Sep 17 00:00:00 2001 From: "qiuyiuestc@gmail.com" Date: Mon, 4 Jul 2011 23:48:07 +0000 Subject: rewrite module memory allocator git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1618 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/idle.c') diff --git a/src/idle.c b/src/idle.c index cae3f34f1a..7bda4dc69b 100644 --- a/src/idle.c +++ b/src/idle.c @@ -115,7 +115,7 @@ void rt_thread_idle_excute(void) rt_hw_interrupt_enable(lock); #ifdef RT_USING_HEAP -#ifdef RT_USING_MODULE +#if defined(RT_USING_MODULE) && defined(RT_USING_SLAB) /* the thread belongs to an application module */ if(thread->flags & RT_OBJECT_FLAG_MODULE) rt_module_free((rt_module_t)thread->module_id, thread->stack_addr); @@ -125,6 +125,7 @@ void rt_thread_idle_excute(void) rt_free(thread->stack_addr); /* delete thread object */ rt_object_delete((rt_object_t)thread); +#endif #ifdef RT_USING_MODULE if(module != RT_NULL) @@ -138,8 +139,7 @@ void rt_thread_idle_excute(void) } /* unload module */ - if(module->nref == 0) rt_module_unload(module); -#endif + if(module->nref == 0) rt_module_unload(module); #endif } } -- cgit v1.3.1