separate idle hook

This commit is contained in:
xieyangrun 2017-05-16 10:02:19 +08:00
parent 3aa9796496
commit e05186dd95
1 changed files with 8 additions and 2 deletions

View File

@ -30,8 +30,14 @@
#include <rthw.h>
#include <rtthread.h>
#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)();
/**