ao_list_for_each_entry(alarm, &alarm_queue, struct ao_task, alarm_queue) {
if ((int16_t) (alarm->alarm - task->alarm) >= 0) {
ao_list_insert(&task->alarm_queue, alarm->alarm_queue.prev);
ao_list_for_each_entry(alarm, &alarm_queue, struct ao_task, alarm_queue) {
if ((int16_t) (alarm->alarm - task->alarm) >= 0) {
ao_list_insert(&task->alarm_queue, alarm->alarm_queue.prev);
ao_task_validate_alarm_queue();
return;
}
}
ao_list_append(&task->alarm_queue, &alarm_queue);
ao_task_validate_alarm_queue();
return;
}
}
ao_list_append(&task->alarm_queue, &alarm_queue);
ao_task_check_alarm(uint16_t tick)
{
struct ao_task *alarm, *next;
ao_task_check_alarm(uint16_t tick)
{
struct ao_task *alarm, *next;
ao_list_for_each_entry_safe(alarm, next, &alarm_queue, struct ao_task, alarm_queue) {
if ((int16_t) (tick - alarm->alarm) < 0)
break;
ao_list_for_each_entry_safe(alarm, next, &alarm_queue, struct ao_task, alarm_queue) {
if ((int16_t) (tick - alarm->alarm) < 0)
break;
/* Task switching function. This must not use any stack variables */
void
ao_yield(void) ao_arch_naked_define
/* Task switching function. This must not use any stack variables */
void
ao_yield(void) ao_arch_naked_define