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. | |
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 501 of file os-sched.h.
|
inline |
Definition at line 1110 of file os-sched.h.
|
inline |
Definition at line 1119 of file os-sched.h.
References exit().
|
inlinestatic |
Definition at line 1128 of file os-sched.h.
References os::rtos::port::interrupts::critical_section::enter().
Referenced by os::rtos::interrupts::lockable::lock(), os_irq_critical_enter(), and os::rtos::interrupts::lockable::try_lock().
|
inlinestatic |
| state | The value to restore the interrupts priorities register. |
Definition at line 1137 of file os-sched.h.
References os::rtos::port::interrupts::critical_section::exit().
Referenced by ~critical_section(), os_irq_critical_exit(), and os::rtos::interrupts::lockable::unlock().