summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-06-28 17:09:00 -0700
committerKeith Packard <keithp@keithp.com>2016-06-29 19:17:45 -0700
commit974aaf73cbb720f1b1183cc239001528b6c7a5b9 (patch)
tree665b32908966885010ee9584295e32afb3b71f14
parenta7e0bb5eb661cfde31c383d605cb9cb8ca568bc7 (diff)
altos: Move comment in ao_sleep_for next to related code
The comment got moved to the wrong place Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/kernel/ao_task.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/ao_task.c b/src/kernel/ao_task.c
index 03d69caa..5b8f9356 100644
--- a/src/kernel/ao_task.c
+++ b/src/kernel/ao_task.c
@@ -460,11 +460,11 @@ ao_sleep_for(__xdata void *wchan, uint16_t timeout)
if (timeout) {
#if HAS_TASK_QUEUE
uint32_t flags;
+ flags = ao_arch_irqsave();
+#endif
/* 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
*/
- flags = ao_arch_irqsave();
-#endif
if (!(ao_cur_task->alarm = ao_time() + timeout + 1))
ao_cur_task->alarm = 1;
#if HAS_TASK_QUEUE