src-avr: Suspend interrupts while switching stacks
authorKeith Packard <keithp@keithp.com>
Wed, 18 May 2011 07:12:40 +0000 (00:12 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 18 May 2011 07:12:40 +0000 (00:12 -0700)
commite7e2fdf45dfbf6393ee0a0ec22e1e5ea49d6cfd5
treeea31fc296501fc096a4f3a7544d918ec123724aa
parentce78906727aa59fc2b91f0fde4c7186b037359ff
src-avr: Suspend interrupts while switching stacks

Setting the stack pointer takes two instructions, so make sure we
don't get an interrupt in the middle of it. Let the restoration of
SREG set the interrupt flag as appropriate.

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