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

Function _hrtimer_process_locked

components/drivers/ktime/src/hrtimer.c:113–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113static void _hrtimer_process_locked(void)
114{
115 rt_ktime_hrtimer_t timer;
116
117 for (timer = _first_hrtimer();
118 (timer != RT_NULL) && (timer->timeout_cnt <= rt_ktime_cputimer_getcnt());
119 timer = _first_hrtimer())
120 {
121 rt_list_remove(&(timer->node));
122
123 if (timer->flag & RT_TIMER_FLAG_PERIODIC)
124 {
125 timer->timeout_cnt = timer->delay_cnt + rt_ktime_cputimer_getcnt();
126 _insert_timer_to_list_locked(timer);
127 }
128 else
129 {
130 timer->flag &= ~RT_TIMER_FLAG_ACTIVATED;
131 }
132
133 if (timer->timeout_func)
134 {
135 timer->timeout_func(timer->parameter);
136 }
137 }
138}
139
140static void _set_next_timeout_locked(void)
141{

Callers 2

_set_next_timeout_lockedFunction · 0.85
rt_ktime_hrtimer_processFunction · 0.85

Calls 3

rt_list_removeFunction · 0.85
rt_ktime_cputimer_getcntFunction · 0.70

Tested by

no test coverage detected