* @brief This function will notify kernel there is one tick passed. * Normally, this function is invoked by clock ISR. */
| 134 | * Normally, this function is invoked by clock ISR. |
| 135 | */ |
| 136 | void rt_tick_increase(void) |
| 137 | { |
| 138 | RT_ASSERT(rt_interrupt_get_nest() > 0); |
| 139 | |
| 140 | RT_OBJECT_HOOK_CALL(rt_tick_hook, ()); |
| 141 | |
| 142 | /* tracing cpu usage */ |
| 143 | _update_process_times(1); |
| 144 | |
| 145 | /* increase the global tick */ |
| 146 | #ifdef RT_USING_SMP |
| 147 | /* get percpu and increase the tick */ |
| 148 | rt_atomic_add(&(rt_cpu_self()->tick), 1); |
| 149 | #else |
| 150 | rt_atomic_add(&(rt_tick), 1); |
| 151 | #endif /* RT_USING_SMP */ |
| 152 | |
| 153 | /* check time slice */ |
| 154 | rt_sched_tick_increase(1); |
| 155 | |
| 156 | /* check timer */ |
| 157 | #ifdef RT_USING_SMP |
| 158 | if (rt_cpu_get_id() != 0) |
| 159 | { |
| 160 | return; |
| 161 | } |
| 162 | #endif |
| 163 | rt_timer_check(); |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * @brief This function will notify kernel there is n tick passed. |
no test coverage detected