*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
ao_list_del(&task->queue);
ao_list_append(&task->queue, &run_queue);
}
ao_list_del(&task->queue);
ao_list_append(&task->queue, &run_queue);
}
ao_list_del(&task->queue);
ao_list_append(&task->queue, ao_task_sleep_queue(wchan));
}
ao_list_del(&task->queue);
ao_list_append(&task->queue, ao_task_sleep_queue(wchan));
}
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_arch_wait_interrupt();
+ if (ao_task_minimize_latency) {
+ ao_arch_release_interrupts();
+ ao_arch_block_interrupts();
+ } else
+ ao_arch_wait_interrupt();
/* Make sure we sleep *at least* delay ticks, which means adding
* one to account for the fact that we may be close to the next tick
*/
/* Make sure we sleep *at least* delay ticks, which means adding
* one to account for the fact that we may be close to the next tick
*/
- printf("%12s: wchan %04x\n",
- task->name,
- (int) task->wchan);
+ printf("%2d: wchan %08x alarm %5d %s\n",
+ task->task_id,
+ (int) task->wchan,
+ task->alarm ? (int16_t) (task->alarm - now) : 9999,
+ task->name);