MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / remove_active_timer

Function remove_active_timer

icicle-cortexm/fuzzware-native/timer.c:183–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183static inline void remove_active_timer(uc_engine *uc, struct Timer *tim) {
184 struct TimerState* timers = &uc->fw->timers;
185 struct Timer *cursor = timers->active_head;
186
187 sync_timers(uc);
188
189 if(cursor == tim ) {
190 // We are changing the front, so also the intermediate ticks
191 timers->active_head = tim->next;
192 timers->cur_countdown = timers->cur_interval = timers->active_head->ticker_val;
193 uc->set_timer_countdown(uc->ctx, uc->fw->timers.cur_countdown);
194 } else {
195 // We are changing something in the middle, we can just unlink it
196 for(; cursor->next != tim; cursor = cursor->next);
197 cursor->next = tim->next;
198 }
199}
200
201static inline void sort_timer_back(struct TimerState* timers, struct Timer *tim) {
202 struct Timer *cursor;

Callers 2

set_timer_reload_valFunction · 0.85
stop_timerFunction · 0.85

Calls 1

sync_timersFunction · 0.85

Tested by

no test coverage detected