Interrupts critical section RAII helper. More...
#include <cmsis-plus/rtos/os.h>
Public Member Functions | |
Constructors & Destructor | |
critical_section () | |
Enter an interrupts critical section. | |
~critical_section () | |
Exit the interrupts critical section. | |
Static Public Member Functions | |
Public Member Functions | |
static state_t | enter (void) |
Enter an interrupts critical section. | |
static void | exit (state_t state) |
Exit the interrupts critical section. | |
Interrupts critical section RAII helper.
Use this class to define a critical section protected to interrupts service routines. The beginning of the critical section is exactly the place where this class is instantiated (the constructor will disable interrupts below the scheduler priority). The end of the critical section is the end of the surrounding block (the destructor will enable the interrupts).
Definition at line 497 of file os-sched.h.
|
inline |
Enter an interrupts critical section.
Definition at line 1118 of file os-sched.h.
|
inline |
Exit the interrupts critical section.
Definition at line 1128 of file os-sched.h.
|
inlinestatic |
Enter an interrupts critical section.
Definition at line 1138 of file os-sched.h.
|
inlinestatic |
Exit the interrupts critical section.
state | The value to restore the interrupts priorities register. |
Definition at line 1148 of file os-sched.h.