* @brief This function will notify kernel there is n tick passed. * Normally, this function is invoked by clock ISR. */
| 168 | * Normally, this function is invoked by clock ISR. |
| 169 | */ |
| 170 | void rt_tick_increase_tick(rt_tick_t tick) |
| 171 | { |
| 172 | RT_ASSERT(rt_interrupt_get_nest() > 0); |
| 173 | |
| 174 | RT_OBJECT_HOOK_CALL(rt_tick_hook, ()); |
| 175 | |
| 176 | /* tracing cpu usage */ |
| 177 | _update_process_times(tick); |
| 178 | |
| 179 | /* increase the global tick */ |
| 180 | #ifdef RT_USING_SMP |
| 181 | /* get percpu and increase the tick */ |
| 182 | rt_atomic_add(&(rt_cpu_self()->tick), tick); |
| 183 | #else |
| 184 | rt_atomic_add(&(rt_tick), tick); |
| 185 | #endif /* RT_USING_SMP */ |
| 186 | |
| 187 | /* check time slice */ |
| 188 | rt_sched_tick_increase(tick); |
| 189 | |
| 190 | /* check timer */ |
| 191 | #ifdef RT_USING_SMP |
| 192 | if (rt_cpu_get_id() != 0) |
| 193 | { |
| 194 | return; |
| 195 | } |
| 196 | #endif |
| 197 | rt_timer_check(); |
| 198 | |
| 199 | #ifdef RT_USING_VDSO |
| 200 | rt_vdso_update_glob_time(); |
| 201 | #endif |
| 202 | } |
| 203 | |
| 204 | /** |
| 205 | * @brief This function will calculate the tick from millisecond. |
no test coverage detected