Lines Matching refs:alarms
121 static list_t* alarms; variable
170 if (!alarms && !lazy_initialize()) { in alarm_new_internal()
228 CHECK(alarms != NULL); in alarm_set_internal()
246 CHECK(alarms != NULL); in alarm_cancel()
264 (!list_is_empty(alarms) && list_front(alarms) == alarm); in alarm_cancel_internal()
279 if ((alarms == NULL) || (alarm == NULL)) return false; in alarm_is_scheduled()
285 if (!alarms) return; in alarm_cleanup()
304 list_free(alarms); in alarm_cleanup()
305 alarms = NULL; in alarm_cleanup()
309 CHECK(alarms == NULL); in lazy_initialize()
318 alarms = list_new(NULL); in lazy_initialize()
319 if (!alarms) { in lazy_initialize()
383 list_free(alarms); in lazy_initialize()
384 alarms = NULL; in lazy_initialize()
390 CHECK(alarms != NULL); in now_ms()
404 list_remove(alarms, alarm); in remove_pending_alarm()
422 (!list_is_empty(alarms) && list_front(alarms) == alarm); in schedule_next_instance()
434 if (list_is_empty(alarms) || in schedule_next_instance()
435 ((alarm_t*)list_front(alarms))->deadline_ms > alarm->deadline_ms) { in schedule_next_instance()
436 list_prepend(alarms, alarm); in schedule_next_instance()
438 for (list_node_t* node = list_begin(alarms); node != list_end(alarms); in schedule_next_instance()
441 if (next == list_end(alarms) || in schedule_next_instance()
443 list_insert_after(alarms, node, alarm); in schedule_next_instance()
452 (!list_is_empty(alarms) && list_front(alarms) == alarm)) { in schedule_next_instance()
459 CHECK(alarms != NULL); in reschedule_root_alarm()
469 if (list_is_empty(alarms)) goto done; in reschedule_root_alarm()
471 next = static_cast<alarm_t*>(list_front(alarms)); in reschedule_root_alarm()
632 if (list_is_empty(alarms) || in callback_dispatch()
633 (alarm = static_cast<alarm_t*>(list_front(alarms)))->deadline_ms > in callback_dispatch()
639 list_remove(alarms, alarm); in callback_dispatch()
732 if (alarms == NULL) { in alarm_debug_dump()
739 dprintf(fd, " Total Alarms: %zu\n\n", list_length(alarms)); in alarm_debug_dump()
742 for (list_node_t* node = list_begin(alarms); node != list_end(alarms); in alarm_debug_dump()