MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_tick_increase

Function rt_tick_increase

src/clock.c:136–164  ·  view source on GitHub ↗

* @brief This function will notify kernel there is one tick passed. * Normally, this function is invoked by clock ISR. */

Source from the content-addressed store, hash-verified

134 * Normally, this function is invoked by clock ISR.
135 */
136void 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.

Callers 15

arm_arch_timer_isrFunction · 0.85
timer_irq_handlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
CLINT_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85
SysTick_HandlerFunction · 0.85

Calls 6

rt_interrupt_get_nestFunction · 0.85
_update_process_timesFunction · 0.85
rt_sched_tick_increaseFunction · 0.85
rt_cpu_get_idFunction · 0.85
rt_timer_checkFunction · 0.85
rt_cpu_selfFunction · 0.70

Tested by

no test coverage detected