![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Rtos API example
CriticalSectionLock Class Reference
[CriticalSectionLock functions]
RAII object for disabling, then restoring, interrupt state Usage: More...
#include <CriticalSectionLock.h>
Public Member Functions | |
void | lock () |
Mark the start of a critical section. | |
void | unlock () |
Mark the end of a critical section. |
Detailed Description
RAII object for disabling, then restoring, interrupt state Usage:
void f() { // some code here { CriticalSectionLock lock; // Code in this block will run with interrupts disabled } // interrupts will be restored to their previous state }
Definition at line 46 of file CriticalSectionLock.h.
Member Function Documentation
void lock | ( | void | ) |
Mark the start of a critical section.
Definition at line 61 of file CriticalSectionLock.h.
void unlock | ( | void | ) |
Mark the end of a critical section.
Definition at line 69 of file CriticalSectionLock.h.
Generated on Sun Jul 17 2022 08:25:44 by
![doxygen](doxygen.png)