atMETEO
An ATmega based weather station
Classes | Namespaces

Utilities for ensuring atomic / non atomic execution of code blocks. More...

#include <inttypes.h>
#include <avr/io.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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...
 

Namespaces

 Avr
 Namespace containing all symbols of the AVR C++ utilities library.
 

Detailed Description

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:

int main() {
// ...
{
// Interrupts are guaranteed to be disabled
}
// ...
}
See also
http://www.nongnu.org/avr-libc/user-manual/group__util__atomic.html