altos: Move comment in ao_sleep_for next to related code
authorKeith Packard <keithp@keithp.com>
Wed, 29 Jun 2016 00:09:00 +0000 (17:09 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 30 Jun 2016 02:17:45 +0000 (19:17 -0700)
The comment got moved to the wrong place

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_task.c

index 03d69caab88906ca573ebd8483f3548139625c29..5b8f9356e922dbe17e839402e862beafab56911b 100644 (file)
@@ -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