g2o
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
g2o::ScopedOpenMPMutex Class Reference

lock a mutex within a scope More...

#include <openmp_mutex.h>

Collaboration diagram for g2o::ScopedOpenMPMutex:
Collaboration graph
[legend]

Public Member Functions

 ScopedOpenMPMutex (OpenMPMutex *mutex)
 
 ~ScopedOpenMPMutex ()
 

Private Member Functions

 ScopedOpenMPMutex (const ScopedOpenMPMutex &)
 
void operator= (const ScopedOpenMPMutex &)
 

Private Attributes

OpenMPMutex *const _mutex
 

Detailed Description

lock a mutex within a scope

Definition at line 87 of file openmp_mutex.h.

Constructor & Destructor Documentation

◆ ScopedOpenMPMutex() [1/2]

g2o::ScopedOpenMPMutex::ScopedOpenMPMutex ( OpenMPMutex mutex)
inlineexplicit

Definition at line 89 of file openmp_mutex.h.

89 : _mutex(mutex) {
90 _mutex->lock();
91 }
OpenMPMutex *const _mutex

References _mutex, and g2o::OpenMPMutex::lock().

◆ ~ScopedOpenMPMutex()

g2o::ScopedOpenMPMutex::~ScopedOpenMPMutex ( )
inline

Definition at line 92 of file openmp_mutex.h.

92{ _mutex->unlock(); }

References _mutex, and g2o::OpenMPMutex::unlock().

◆ ScopedOpenMPMutex() [2/2]

g2o::ScopedOpenMPMutex::ScopedOpenMPMutex ( const ScopedOpenMPMutex )
private

Member Function Documentation

◆ operator=()

void g2o::ScopedOpenMPMutex::operator= ( const ScopedOpenMPMutex )
private

Member Data Documentation

◆ _mutex

OpenMPMutex* const g2o::ScopedOpenMPMutex::_mutex
private

Definition at line 95 of file openmp_mutex.h.

Referenced by ScopedOpenMPMutex(), and ~ScopedOpenMPMutex().


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