From ee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Tue, 14 Jun 2011 23:59:42 +0000 Subject: change the RT_DEBUG_NOT_REENT to RT_DEBUG_NOT_IN_INTERRUPT. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1503 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/idle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/idle.c') diff --git a/src/idle.c b/src/idle.c index 1b2f464a2a..cae3f34f1a 100644 --- a/src/idle.c +++ b/src/idle.c @@ -60,8 +60,7 @@ void rt_thread_idle_sethook(void (*hook)()) */ void rt_thread_idle_excute(void) { - - RT_DEBUG_NOT_REENT + RT_DEBUG_NOT_IN_INTERRUPT; /* check the defunct thread list */ if (!rt_list_isempty(&rt_thread_defunct)) @@ -149,9 +148,10 @@ static void rt_thread_idle_entry(void* parameter) { while (1) { -#ifdef RT_USING_HOOK - RT_OBJECT_HOOK_CALL(rt_thread_idle_hook); -#endif + #ifdef RT_USING_HOOK + if (rt_thread_idle_hook != RT_NULL) + rt_thread_idle_hook(); + #endif rt_thread_idle_excute(); } -- cgit v1.3.1