From: Keith Packard Date: Wed, 29 Jun 2016 00:09:00 +0000 (-0700) Subject: altos: Move comment in ao_sleep_for next to related code X-Git-Tag: 1.6.5~1^2~23 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=974aaf73cbb720f1b1183cc239001528b6c7a5b9 altos: Move comment in ao_sleep_for next to related code The comment got moved to the wrong place Signed-off-by: Keith Packard --- 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