Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::system::interrupts::ScopedControlCritical< Interrupts > Class Template Reference

RAII critical section against the control tick and everything below. More...

Detailed Description

template<typename Interrupts>
class sbl::system::interrupts::ScopedControlCritical< Interrupts >

RAII critical section against the control tick and everything below.

Raises the interrupt mask to CONTROL_CEILING for its scope and restores the previous mask on exit. Safe to nest: the driver's raise never lowers the mask. Handlers above the ceiling - audio, USB/MIDI, other DMA - are unaffected by construction.

Use it around any multi-word state shared between main and the control tick. Do not use it from a handler above the ceiling (that handler must not touch such state at all), and do not reach for disable_all() instead: that is for death paths only.

Template Parameters
InterruptsThe MCU's interrupts driver (e.g. sbl::driver::Interrupts)

Definition at line 78 of file interrupts.hpp.

#include <interrupts.hpp>

Public Member Functions

 ScopedControlCritical (const ScopedControlCritical &)=delete
 
ScopedControlCritical & operator= (const ScopedControlCritical &)=delete
 

Constructor & Destructor Documentation

◆ ScopedControlCritical()

template<typename Interrupts >
sbl::system::interrupts::ScopedControlCritical< Interrupts >::ScopedControlCritical ( )
inline

Definition at line 80 of file interrupts.hpp.

◆ ~ScopedControlCritical()

template<typename Interrupts >
sbl::system::interrupts::ScopedControlCritical< Interrupts >::~ScopedControlCritical ( )
inline

Definition at line 81 of file interrupts.hpp.


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