From 974aaf73cbb720f1b1183cc239001528b6c7a5b9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 28 Jun 2016 17:09:00 -0700 Subject: [PATCH] altos: Move comment in ao_sleep_for next to related code The comment got moved to the wrong place Signed-off-by: Keith Packard --- src/kernel/ao_task.c | 4 ++-- 1 file 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 -- 2.30.2