This function sets a hook function to idle thread loop. When the system performs idle loop, this hook function should be invoked.
71{
75
77
79 {
80 if (idle_hook_list[i] ==
RT_NULL)
81 {
82 idle_hook_list[i] = hook;
83 ret = RT_EOK;
84 break;
85 }
86 }
87
89
90 return ret;
91}
rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *lock)
This function will disable the local interrupt and then lock the spinlock, will lock the thread sched...
void rt_spin_unlock_irqrestore(struct rt_spinlock *lock, rt_base_t level)
This function will unlock the spinlock and then restore current cpu interrupt status,...
#define RT_IDLE_HOOK_LIST_SIZE