> -----Original Message-----
> From: 
> avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org 
> [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.
> org] On Behalf Of Joerg Wunsch
> Sent: Wednesday, June 09, 2010 1:50 PM
> To: avr-libc-dev@nongnu.org
> Subject: Re: [avr-libc-dev] Re: bug #22163 (atomic not 
> working asexpectedinC++)
> 
> As Weddington, Eric wrote:
> 
> > As a side note, wouldn't declaring some_temp_variable as volatile
> > solve the issue above?
> 
> I think it does, but it's another pessimization...  It forces the
> function to get a stack frame even if it otherwise doesn't need it,
> and adds memory access cycles.  The optimizer could perfectly keep the
> variable in a register, it's just that the developer intended to move
> the time-critical routine outside the interrupt block.
> 

Ah, I see your point now. Agreed.

_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to