| 138 | } |
| 139 | |
| 140 | static void _set_next_timeout_locked(void) |
| 141 | { |
| 142 | rt_ktime_hrtimer_t timer; |
| 143 | rt_ubase_t next_timeout_hrtimer_cnt; |
| 144 | rt_bool_t find_next; |
| 145 | |
| 146 | do |
| 147 | { |
| 148 | find_next = RT_FALSE; |
| 149 | if ((timer = _first_hrtimer()) != RT_NULL) |
| 150 | { |
| 151 | next_timeout_hrtimer_cnt = _cnt_convert(timer->timeout_cnt); |
| 152 | if (next_timeout_hrtimer_cnt > 0) |
| 153 | { |
| 154 | rt_ktime_hrtimer_settimeout(next_timeout_hrtimer_cnt); |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | _hrtimer_process_locked(); |
| 159 | find_next = RT_TRUE; |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | while (find_next); |
| 164 | } |
| 165 | |
| 166 | void rt_ktime_hrtimer_process(void) |
| 167 | { |
no test coverage detected