A simple wrapper class that helps utilize OS_CRIT objects to lock tasks and enter critical sections more effectively.
More...
#include <nbrtos.h>
A simple wrapper class that helps utilize OS_CRIT objects to lock tasks and enter critical sections more effectively.
When an OSCriticalSectionObj is constructed it calls LockAndEnter() on the OS_CRIT object that is passed in, and will wait indefinitely to claim the section. When the object is deconstructed, it calls LeaveAndUnlock() on the OS_CRIT object.
- See also
- OS_CRIT::LockAndEnter()
-
OS_CRIT::LeaveAndUnlock()
◆ OSLockAndCritObj()
OSLockAndCritObj::OSLockAndCritObj |
( |
OS_CRIT & |
ocrit | ) |
|
|
inline |
Initialize the OSCriticalSectionObj object, and then call LockAndEnter() on the OS_CRIT object that is passed in.
- Parameters
-
ocrit | The object that will be used to enter and leave the critical section. |
◆ ~OSLockAndCritObj()
OSLockAndCritObj::~OSLockAndCritObj |
( |
| ) |
|
|
inline |
Initialize the OSCriticalSectionObj object, and then call LeaveAndUnlock() on the OS_CRIT object that is passed in.
- Parameters
-
ocrit | The object that will be used to enter and leave the critical section. |
The documentation for this class was generated from the following file: