X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_task.c;h=de23ea02421013e4186801b85664abb81630d99a;hb=40236913922e0395780cd7d90354546ecaf279f9;hp=cf0b58ed8eaa0bf939e0e77bc80635b69f6f52db;hpb=a35424cd48205af89ba023db979959dc75b06706;p=fw%2Faltos diff --git a/src/kernel/ao_task.c b/src/kernel/ao_task.c index cf0b58ed..de23ea02 100644 --- a/src/kernel/ao_task.c +++ b/src/kernel/ao_task.c @@ -3,7 +3,8 @@ * * 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 - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -372,7 +373,11 @@ ao_yield(void) ao_arch_naked_define if (!ao_list_is_empty(&run_queue)) break; /* Wait for interrupts when there's nothing ready */ - ao_arch_wait_interrupt(); + if (ao_task_minimize_latency) { + ao_arch_release_interrupts(); + ao_arch_block_interrupts(); + } else + ao_arch_wait_interrupt(); } ao_cur_task = ao_list_first_entry(&run_queue, struct ao_task, queue); #else