altos: Move comment in ao_sleep_for next to related code
[fw/altos] / 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