Update idle.c

This commit is contained in:
geniusgogo 2017-05-22 23:53:55 +08:00 committed by GitHub
parent 662f619cf6
commit 3c14a8867d
1 changed files with 7 additions and 1 deletions

View File

@ -185,7 +185,13 @@ static void rt_thread_idle_entry(void *parameter)
{
while (1)
{
RT_OBJECT_HOOK_CALL(rt_thread_idle_hook,());
#if defined(RT_USING_IDLE_HOOK) && (RT_USING_IDLE_HOOK == 1)
if (rt_thread_idle_hook != RT_NULL)
{
rt_thread_idle_hook();
}
#endif
rt_thread_idle_excute();
}
}