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

Function stop_timer

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

Source from the content-addressed store, hash-verified

414}
415
416uc_err stop_timer(uc_engine *uc, uint32_t id) {
417 struct TimerState* timers = &uc->fw->timers;
418
419 if(id >= MAX_TIMERS) {
420 perror("[TIMER ERROR] stop_timer: Too high id passed\n");
421 exit(-1);
422 } else if(!timers->timers[id].in_use) {
423 perror("[TIMER ERROR] stop_timer: Unused timer to be started\n");
424 exit(-1);
425 }
426
427 struct Timer *tim = &timers->timers[id];
428 if(tim->is_active) {
429 tim->is_active = 0;
430
431 remove_active_timer(uc, tim);
432 }
433
434 return UC_ERR_OK;
435}
436
437void *timers_take_snapshot(uc_engine *uc) {
438 size_t size = sizeof(struct TimerState);

Callers 3

rem_timerFunction · 0.85
hook_syst_mmio_writeFunction · 0.85
init_systickFunction · 0.85

Calls 1

remove_active_timerFunction · 0.85

Tested by

no test coverage detected