[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] patch to fix unbalanced 'cli' that causes interrupts
Re: [avr-gcc-list] patch to fix unbalanced 'cli' that causes interrupts to always be disabled
Sun, 1 Dec 2002 22:12:04 +0100 (CET)
> I believe that the included patch addresses the real problem. The signal
> function, which by definition has interrupts disabled, does not require
> any cli/sei when modifying the SPH. This is the case for the prologue
> function, yet not the epilogue function. This patch treats the signal
> functions the same in both prologue and epilogue creation.
The problem is that a signal function could enable interrupts in its
body (after servicing the interrupt source, so that the interrupt
condition goes away and we won't be interrupted recursively), so the
interrupt flag in epilogue is unknown. The signal/interrupt epilogue
ends with "reti" which enables interrupts again.
Am I missing something? I don't see any GCC bug yet... :)
avr-gcc-list at http://avr1.org