![]() |
NetBurner 3.4.0f
PDF Version |
A simple wrapper class that uses an OS_CRIT object to try and claim a critical section, and will continue the attempt until it is able to do so. More...
#include <nbrtos.h>
Public Member Functions | |
OSSpinCrit (OS_CRIT &ocrit) | |
Initialize the OSSpinCrit object, and then call EnterNoWait() repeatedly on the OS_CRIT object that is passed in until it is able to claim the critical section. | |
~OSSpinCrit () | |
Call Leave() on the OS_CRIT object, and then destruct/. | |
A simple wrapper class that uses an OS_CRIT object to try and claim a critical section, and will continue the attempt until it is able to do so.
The way this class is implemented allows the task to continue to be made active by the scheduler. When an OSSpinCrit is constructed, it calls EnterNoWait() repeatedly on the OS_CRIT object passed in until it is able to claim the critical section. When the object is deconstructed, it calls Leave() on the OS_CRIT object.
|
inline |
Initialize the OSSpinCrit object, and then call EnterNoWait() repeatedly on the OS_CRIT object that is passed in until it is able to claim the critical section.
&ocrit | The object that will be used to enter and leave the critical section. |
|
inline |
Call Leave() on the OS_CRIT object, and then destruct/.