From: Keith Packard Date: Mon, 19 Mar 2012 18:24:43 +0000 (-0700) Subject: Don't disable interrupts before saving interrupt flag on AVR X-Git-Tag: 1.0.9.4~23 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=6a14bee42a8431c909bcd74b0acec57329bc0284 Don't disable interrupts before saving interrupt flag on AVR This ignores the interrupt disabled state, so we'd always leave ao_yield with interrupts disabled. Signed-off-by: Keith Packard --- diff --git a/src/avr/ao_arch.h b/src/avr/ao_arch.h index c189ccba..b816279e 100644 --- a/src/avr/ao_arch.h +++ b/src/avr/ao_arch.h @@ -105,7 +105,6 @@ extern uint8_t ao_cpu_sleep_disable; asm("push r14" "\n\t" "push r13" "\n\t" "push r12" "\n\t" "push r11" "\n\t" "push r10"); \ asm("push r9" "\n\t" "push r8" "\n\t" "push r7" "\n\t" "push r6" "\n\t" "push r5"); \ asm("push r4" "\n\t" "push r3" "\n\t" "push r2" "\n\t" "push r1" "\n\t" "push r0"); \ - cli(); \ asm("in r0, __SREG__" "\n\t" "push r0"); \ sei(); \ } while (0)