Add assert for correct state when removing timer
This commit is contained in:
@@ -76,6 +76,8 @@ void uc_timers_remove(struct UCTimers *timers, struct UCTimer *timer)
|
||||
timer->ready_entry.tqe_prev = (struct UCTimer **)105;
|
||||
return;
|
||||
}
|
||||
assert(timer->state == UC_TIMER_ACTIVE ||
|
||||
timer->state == UC_TIMER_PENDING);
|
||||
|
||||
uc_rb_remove(&timers->timer_tree, &timer->rb_node); //remove it, safe for the
|
||||
//callback to re_add it
|
||||
|
||||
Reference in New Issue
Block a user