diff options
author | Keith Packard <keithp@keithp.com> | 2011-10-11 17:39:35 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-10-11 17:39:35 -0600 |
commit | 0a186e92c5773c5d908e9cee889d645a8172dcdc (patch) | |
tree | 09f2644b5774d879b615ba4c9228db0a45b4e9a9 | |
parent | f3453068b0feb640b9d11dbeb021c535ce8b4a31 (diff) |
altos/avr: Make ao_arch_critical argument be a statement
Wrap the argument to ao_arch_critical in do { } while (0); to make
sure it gets correctly checked as a statement.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/avr/ao_arch.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/avr/ao_arch.h b/src/avr/ao_arch.h index c695a725..2be4abee 100644 --- a/src/avr/ao_arch.h +++ b/src/avr/ao_arch.h @@ -143,7 +143,7 @@ extern uint8_t ao_cpu_sleep_disable; asm("ret"); \ } while(0) -#define ao_arch_critical(b) do { cli(); b; sei(); } while (0) +#define ao_arch_critical(b) do { cli(); do { b } while (0); sei(); } while (0) #define AO_TELESCIENCE_NUM_ADC 12 |