summaryrefslogtreecommitdiff
path: root/src/idle.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-14 23:59:42 +0000
committer[email protected] <[email protected]>2011-06-14 23:59:42 +0000
commitee68988518f8aa2b7cdafc2bcfe0abe6ad7df385 (patch)
treec673b27eee805e37c3c138e4e1d4c3596f985c9b /src/idle.c
parent99dc4465a66d757b1a94220b513d30e647861b4c (diff)
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
Diffstat (limited to 'src/idle.c')
-rw-r--r--src/idle.c10
1 files changed, 5 insertions, 5 deletions
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();
}