NetBurner 3.5.0
PDF Version
 
OSCriticalSectionObj Class Reference

A simple wrapper class that helps utilize OS_CRIT objects more effectively. More...

#include <nbrtos.h>

Public Member Functions

 OSCriticalSectionObj (OS_CRIT &ocrit)
 Initialize the OSCriticalSectionObj object, and then call Enter() on the OS_CRIT object that is passed in.
 
 OSCriticalSectionObj (OS_CRIT &ocrit, bool NoWait, TickTimeout &timeout)
 Initialize the OSCriticalSectionObj object, and then call Enter() on the OS_CRIT object that is passed in.
 
 ~OSCriticalSectionObj ()
 Destructs the OSCriticalSectionObj object, and call Leave() on the OS_CRIT object that was passed into the constructor.
 

Detailed Description

A simple wrapper class that helps utilize OS_CRIT objects more effectively.

When an OSCriticalSectionObj is constructed calls Enter() on the OS_CRIT object that is passed in, and will wait indefinitely to claim the section. When the object is deconstructed, it calls Leave() on the OS_CRIT object.

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

Constructor & Destructor Documentation

◆ OSCriticalSectionObj() [1/2]

OSCriticalSectionObj::OSCriticalSectionObj ( OS_CRIT & ocrit)
inline

Initialize the OSCriticalSectionObj object, and then call Enter() on the OS_CRIT object that is passed in.

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

◆ OSCriticalSectionObj() [2/2]

OSCriticalSectionObj::OSCriticalSectionObj ( OS_CRIT & ocrit,
bool NoWait,
TickTimeout & timeout )
inline

Initialize the OSCriticalSectionObj object, and then call Enter() on the OS_CRIT object that is passed in.

Parameters
ocritThe object that will be used to enter and leave the critical section.
NoWaitSet to true to enable the no waiting mode of operation.
timeoutNumber of TickTimout time ticks to wait for the critical section.

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