|
atMETEO
An ATmega based weather station
|
Utilities for ensuring atomic / non atomic execution of code blocks. More...
Files | |
| file | atomic.h |
| Utilities for ensuring atomic / non atomic execution of code blocks. | |
Classes | |
| class | Avr::AtomicGuard< TAtomicMode > |
| RAII-style wrapper to disable interrupts for the duration of a scoped block. More... | |
| class | Avr::AtomicForceOn |
| Configuration parameter for AtomicGuard that unconditionally enables interrupts on exit. More... | |
| class | Avr::AtomicRestoreState |
| Configuration parameter for AtomicGuard that saves the global interrupt state and restores it on exit. More... | |
| class | Avr::NonAtomicGuard< TNonAtomicMode > |
| RAII-style wrapper to enable interrupts for the duration of a scoped block. More... | |
| class | Avr::NonAtomicForceOff |
| Configuration parameter for NonAtomicGuard that unconditionally disables interrupts on exit. More... | |
| class | Avr::NonAtomicRestoreState |
| Configuration parameter for NonAtomicGuard that saves the global interrupt state and restores it on exit. More... | |
Utilities for ensuring atomic / non atomic execution of code blocks.
This module contains RAII-style utilities that ensure atomic / non atomic execution of scoped blocks by controlling the global interrupt state (in the SREG register).
Usage:
| class Avr::AtomicGuard |
RAII-style wrapper to disable interrupts for the duration of a scoped block.
| TAtomicMode | Controls if interrupts should be globally enabled (AtomicForceOn) or if the global interrupt state should be restored (AtomicRestoreState) when leaving the scoped block. |
| class Avr::AtomicForceOn |
Configuration parameter for AtomicGuard that unconditionally enables interrupts on exit.
An AtomicGuard with AtomicForceOn avoids saving the SREG status and hence saves flash space. A safer alternative is AtomicRestoreState which will save and restore the interrupt state.
| class Avr::AtomicRestoreState |
Configuration parameter for AtomicGuard that saves the global interrupt state and restores it on exit.
| class Avr::NonAtomicGuard |
RAII-style wrapper to enable interrupts for the duration of a scoped block.
NonAtomicGuard is especially useful within an block where interrupts are globally disabled using AtomicGuard.
| TNonAtomicMode | Controls if interrupts should be globally disabled (NonAtomicForceOff) or if the global interrupt state should be restored (NonAtomicRestoreState) when leaving the scoped block. |
| class Avr::NonAtomicForceOff |
Configuration parameter for NonAtomicGuard that unconditionally disables interrupts on exit.
A NonAtomicGuard with NonAtomicForceOff avoids saving the SREG status and hence saves flash space. A safer alternative is NonAtomicRestoreState which will save and restore the interrupt state.
| class Avr::NonAtomicRestoreState |
Configuration parameter for NonAtomicGuard that saves the global interrupt state and restores it on exit.
1.8.13