avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] effects of ATOMIC_FORCEON and NONATMOIC_FORCEOFF


From: Michael Hennebry
Subject: Re: [avr-chat] effects of ATOMIC_FORCEON and NONATMOIC_FORCEOFF
Date: Sun, 12 Apr 2015 01:32:25 -0500 (CDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Sat, 11 Apr 2015, Britton Kerin wrote:

The documentation for ATOMIC_FORCEON contains this:

    This is a possible parameter for ATOMIC_BLOCK. When used, it will cause
    the ATOMIC_BLOCK to force the state of the   SREG register on exit,
    enabling the Global Interrupt Status flag bit. This saves on flash
    space as the previous value of the SREG register does not need to be
    saved at the start of the block.

The documentation for NONATOMIC_FORCEOFF contains somehting similar.

I thin in both these cases, in addition to saved flash space there is going
to be a little bit of RAM space and possible few instructions, correct?

The savings are normally 1 word of flash, 1 cycle and 1 register.
If there is register pressure, the savings could be larger.

--
Michael   address@hidden
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then."   --   John Woods



reply via email to

[Prev in Thread] Current Thread [Next in Thread]