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

Function _set_next_timeout

components/drivers/cputime/cputimer.c:49–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static void _set_next_timeout()
50{
51 struct rt_cputimer *t;
52
53 if (&_cputimer_list != _cputimer_list.prev)
54 {
55 t = rt_list_entry((&_cputimer_list)->next, struct rt_cputimer, row);
56 if (_cputimer_nowtimer != RT_NULL)
57 {
58 if (t != _cputimer_nowtimer && t->timeout_tick < _cputimer_nowtimer->timeout_tick)
59 {
60 _cputimer_nowtimer = t;
61 clock_cpu_settimeout(t->timeout_tick, _cputime_timeout_callback, t);
62 }
63 }
64 else
65 {
66 _cputimer_nowtimer = t;
67 clock_cpu_settimeout(t->timeout_tick, _cputime_timeout_callback, t);
68 }
69 }
70 else
71 {
72 _cputimer_nowtimer = RT_NULL;
73 clock_cpu_settimeout(RT_NULL, RT_NULL, RT_NULL);
74 }
75}
76
77void rt_cputimer_init(rt_cputimer_t timer,
78 const char *name,

Callers 4

rt_cputimer_deleteFunction · 0.85
rt_cputimer_startFunction · 0.85
rt_cputimer_stopFunction · 0.85
rt_cputimer_detachFunction · 0.85

Calls 1

clock_cpu_settimeoutFunction · 0.85

Tested by

no test coverage detected