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

Function rt_cputimer_delete

components/drivers/cputime/cputimer.c:103–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103rt_err_t rt_cputimer_delete(rt_cputimer_t timer)
104{
105 rt_base_t level;
106
107 /* parameter check */
108 RT_ASSERT(timer != RT_NULL);
109 RT_ASSERT(clock_cpu_issettimeout() != RT_FALSE);
110
111 /* disable interrupt */
112 level = rt_hw_interrupt_disable();
113
114 rt_list_remove(&timer->row);
115 /* stop timer */
116 timer->parent.flag &= ~RT_TIMER_FLAG_ACTIVATED;
117
118 /* enable interrupt */
119 rt_hw_interrupt_enable(level);
120
121 _set_next_timeout();
122
123 return RT_EOK;
124}
125
126rt_err_t rt_cputimer_start(rt_cputimer_t timer)
127{

Callers

nothing calls this directly

Calls 5

clock_cpu_issettimeoutFunction · 0.85
rt_list_removeFunction · 0.85
_set_next_timeoutFunction · 0.85
rt_hw_interrupt_disableFunction · 0.50
rt_hw_interrupt_enableFunction · 0.50

Tested by

no test coverage detected