NetBurner 3.5.0
PDF Version
 
OSSpinCrit Class Reference

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/.
 

Detailed Description

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.

See also
OS_CRIT::EnterNoWait(), OS_CRIT::Leave()

Constructor & Destructor Documentation

◆ OSSpinCrit()

OSSpinCrit::OSSpinCrit ( OS_CRIT & ocrit)
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.

Parameters
&ocritThe object that will be used to enter and leave the critical section.

The documentation for this class was generated from the following file: