projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/kernel: Allow ao_cmd to be built without tasking
[fw/altos]
/
src
/
kernel
/
ao_task.c
diff --git
a/src/kernel/ao_task.c
b/src/kernel/ao_task.c
index cf0b58ed8eaa0bf939e0e77bc80635b69f6f52db..de23ea02421013e4186801b85664abb81630d99a 100644
(file)
--- 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
*
* 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
*
* 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 */
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
}
ao_cur_task = ao_list_first_entry(&run_queue, struct ao_task, queue);
#else