altos: avoid mixed declarations and code in ao_task.c
authorKeith Packard <keithp@keithp.com>
Wed, 20 Apr 2016 03:19:59 +0000 (23:19 -0400)
committerKeith Packard <keithp@keithp.com>
Wed, 20 Apr 2016 03:21:30 +0000 (23:21 -0400)
sdcc can't handle this.

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

index 104d1074b8b66a6b8286a9e21e1f79d1e3ad7b8e..e430edc6c02f3e5854b5163ebd18afc26d6c0e0e 100644 (file)
@@ -442,10 +442,12 @@ ao_wakeup(__xdata void *wchan) __reentrant
        }
        ao_arch_irqrestore(flags);
 #else
+       {
        uint8_t i;
        for (i = 0; i < ao_num_tasks; i++)
                if (ao_tasks[i]->wchan == wchan)
                        ao_tasks[i]->wchan = NULL;
+       }
 #endif
        ao_check_stack();
 }