diff --git a/src/idle.c b/src/idle.c index aab09cb913..fab4b82439 100644 --- a/src/idle.c +++ b/src/idle.c @@ -30,8 +30,14 @@ #include #include +#if defined (RT_USING_HOOK) +#ifndef RT_USING_IDLE_HOOK +#deifne RT_USING_IDLE_HOOK 1 +#endif +#endif + #ifndef IDLE_THREAD_STACK_SIZE -#if defined (RT_USING_HOOK) || defined(RT_USING_HEAP) +#if defined (RT_USING_IDLE_HOOK) || defined(RT_USING_HEAP) #define IDLE_THREAD_STACK_SIZE 256 #else #define IDLE_THREAD_STACK_SIZE 128 @@ -44,7 +50,7 @@ static rt_uint8_t rt_thread_stack[IDLE_THREAD_STACK_SIZE]; extern rt_list_t rt_thread_defunct; -#ifdef RT_USING_HOOK +#ifdef RT_USING_IDLE_HOOK static void (*rt_thread_idle_hook)(); /**