![]() |
VR-Forces 4.10 Class Documentation
|
RAII manager object for accessing paralle tick functionality. More...

Public Types | |
| typedef DtParallelTickManager::AccessType | AccessType |
Public Member Functions | |
| DtCriticalSection (DtSimManager *, AccessType initState) | |
| Construct and set mutex state to initial state. More... | |
| DtCriticalSection (DtSimManager *) | |
| Construct and do not change mutex state. More... | |
| ~DtCriticalSection () | |
| void | reset (AccessType access) |
| Change mutex state. More... | |
| void | unlock () |
| Set mutex state to UNLOCKED. More... | |
| void | lockShared () |
| Set mutex state to SHARED. More... | |
| void | lock () |
| Set mutex state to EXCLUSIVE. More... | |
| void | release () |
| Set mutex state to value it had when this object was created. More... | |
| DtCriticalSection (DtCriticalSection &, AccessType to) | |
| Construct when there is already another critical section object on the stack. More... | |
| DtCriticalSection (DtCriticalSection &) | |
Protected Member Functions | |
| DtCriticalSection (DtParallelTickManager *, AccessType to) | |
| DtCriticalSection (DtParallelTickManager *) | |
Protected Attributes | |
| DtParallelTickManager * | mgr |
| DtParallelTickManager::ThreadLocalInfo * | info |
| AccessType | from |
| AccessType | to |
Friends | |
| class | DtParallelTickManager |
RAII manager object for accessing paralle tick functionality.
This class works similarly to the scoped lock classes that most mutexes use.
This class is used to change the state of the global mutex and guarantee that it is reset to the original value regardless of how the code exits the block where the critical section is defined.
For examples of usage see the parallelTick example.
|
explicit |
Construct and set mutex state to initial state.
|
explicit |
Construct and do not change mutex state.
|
explicit |
Construct when there is already another critical section object on the stack.
Note: other constructors will work here but this one may be more efficient.
|
explicit |
| DtCriticalSection::~DtCriticalSection | ( | ) |
|
explicitprotected |
|
explicitprotected |
| void DtCriticalSection::reset | ( | AccessType | access | ) |
Change mutex state.
| void DtCriticalSection::unlock | ( | ) |
Set mutex state to UNLOCKED.
| void DtCriticalSection::lockShared | ( | ) |
Set mutex state to SHARED.
| void DtCriticalSection::lock | ( | ) |
Set mutex state to EXCLUSIVE.
|
inline |
Set mutex state to value it had when this object was created.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |