From 88bfa45e7a919883066910fdd98f06f3f3c6e864 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Sat, 22 May 2010 01:13:41 +0000 Subject: [PATCH] fix thread delete issue when module is not used. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@725 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/idle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idle.c b/src/idle.c index 4ff95e6050..b5cccf1260 100644 --- a/src/idle.c +++ b/src/idle.c @@ -65,10 +65,10 @@ static void rt_thread_idle_entry(void* parameter) if (!rt_list_isempty(&rt_thread_defunct)) { rt_base_t lock; + struct rt_thread* thread = rt_list_entry(rt_thread_defunct.next, struct rt_thread, tlist); #ifdef RT_USING_MODULE rt_module_t module = thread->module_parent; #endif - struct rt_thread* thread = rt_list_entry(rt_thread_defunct.next, struct rt_thread, tlist); /* disable interrupt */ lock = rt_hw_interrupt_disable();