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

Function _cputime_timeout_callback

components/drivers/cputime/cputimer.c:26–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26static void _cputime_timeout_callback(void *parameter)
27{
28 struct rt_cputimer *timer;
29 timer = (struct rt_cputimer *)parameter;
30 rt_base_t level;
31 level = rt_hw_interrupt_disable();
32 _cputimer_nowtimer = RT_NULL;
33 rt_list_remove(&(timer->row));
34 rt_hw_interrupt_enable(level);
35 timer->timeout_func(timer->parameter);
36
37 if (&_cputimer_list != _cputimer_list.prev)
38 {
39 struct rt_cputimer *t;
40 t = rt_list_entry(_cputimer_list.next, struct rt_cputimer, row);
41 clock_cpu_settimeout(t->timeout_tick, _cputime_timeout_callback, t);
42 }
43 else
44 {
45 clock_cpu_settimeout(RT_NULL, RT_NULL, RT_NULL);
46 }
47}
48
49static void _set_next_timeout()
50{

Callers

nothing calls this directly

Calls 4

rt_list_removeFunction · 0.85
clock_cpu_settimeoutFunction · 0.85
rt_hw_interrupt_disableFunction · 0.50
rt_hw_interrupt_enableFunction · 0.50

Tested by

no test coverage detected