projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f345306
)
altos/avr: Make ao_arch_critical argument be a statement
author
Keith Packard
<keithp@keithp.com>
Tue, 11 Oct 2011 23:39:35 +0000
(17:39 -0600)
committer
Keith Packard
<keithp@keithp.com>
Tue, 11 Oct 2011 23:39:35 +0000
(17:39 -0600)
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>
src/avr/ao_arch.h
patch
|
blob
|
history
diff --git
a/src/avr/ao_arch.h
b/src/avr/ao_arch.h
index c695a725669bf2e64bf77f49d31088f779fc3676..2be4abeece26db527dd25b6ccbd9193d139e7b2b 100644
(file)
--- 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