distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::InterruptMaskingUnmaskingLock< Function > Class Template Reference

InterruptMaskingUnmaskingLock class is a RAII wrapper for interrupt mask manipulation. More...

#include "distortos/internal/synchronization/InterruptMaskingUnmaskingLock.hpp"

Public Member Functions

 InterruptMaskingUnmaskingLock ()
 InterruptMaskingUnmaskingLock's constructor. More...
 
 ~InterruptMaskingUnmaskingLock ()
 InterruptMaskingUnmaskingLock's destructor. More...
 
 InterruptMaskingUnmaskingLock (const InterruptMaskingUnmaskingLock &)=delete
 
 InterruptMaskingUnmaskingLock (InterruptMaskingUnmaskingLock &&)=delete
 
InterruptMaskingUnmaskingLockoperator= (const InterruptMaskingUnmaskingLock &)=delete
 
InterruptMaskingUnmaskingLockoperator= (InterruptMaskingUnmaskingLock &&)=delete
 

Private Attributes

const architecture::InterruptMask interruptMask_
 interrupt mask More...
 

Detailed Description

template<architecture::InterruptMask(&)() Function>
class distortos::internal::InterruptMaskingUnmaskingLock< Function >

InterruptMaskingUnmaskingLock class is a RAII wrapper for interrupt mask manipulation.

Template Parameters
Functionis a reference to function which modifies interrupt mask and returns architecture::InterruptMask; architecture::enableInterruptMasking() or architecture::disableInterruptMasking() should be used

Constructor & Destructor Documentation

◆ InterruptMaskingUnmaskingLock()

template<architecture::InterruptMask(&)() Function>
distortos::internal::InterruptMaskingUnmaskingLock< Function >::InterruptMaskingUnmaskingLock ( )
inline

InterruptMaskingUnmaskingLock's constructor.

Enables/disables interrupt masking, saving current interrupt mask for use in destructor.

◆ ~InterruptMaskingUnmaskingLock()

template<architecture::InterruptMask(&)() Function>
distortos::internal::InterruptMaskingUnmaskingLock< Function >::~InterruptMaskingUnmaskingLock ( )
inline

InterruptMaskingUnmaskingLock's destructor.

Restores previous interrupt masking state by restoring interrupt mask saved in constructor.

Member Data Documentation

◆ interruptMask_

template<architecture::InterruptMask(&)() Function>
const architecture::InterruptMask distortos::internal::InterruptMaskingUnmaskingLock< Function >::interruptMask_
private

interrupt mask


The documentation for this class was generated from the following file: