1#ifndef QOS_CPP_CRITICAL
2#define QOS_CPP_CRITICAL
4#include "include/types.hpp"
74 inline void scope(
void )
noexcept {}
92 class lock final :
private nonCopyable {
94 static void enter(
void )
noexcept;
95 static void exit(
void )
noexcept;
98 static volatile uint32_t flags;
99 static volatile int nestingLevel;
100 bool entered{
true };
105 explicit operator
bool() noexcept;
129for ( critical::lock critical_lock; critical_lock; ) \
friend bool setInterruptsED(const int_restorer_t rFcn, const int_disabler_t dFcn) noexcept
Set the hardware-specific code for global interrupt enable/disable. Setting this allows you to commun...
void scope(void) noexcept
Enables a scoped critical section with minimal syntax overhead.
Definition critical.hpp:74
uint32_t(*)(void) int_disabler_t
Function called by critical::enter() to disable interrupts.
Definition critical.hpp:51
bool setInterruptsED(const int_restorer_t rFcn, const int_disabler_t dFcn) noexcept
Set the hardware-specific code for global interrupt enable/disable. Setting this allows you to commun...
void(*)(uint32_t) int_restorer_t
Function called by critical::exit() to restore interrupts.
Definition critical.hpp:30
OS Critical interfaces.
Definition critical.hpp:56
OS/Kernel interfaces.
Definition bytebuffer.hpp:7