libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::Threads::recursive_mutex::scoped_lock Class Reference

#include <threads_none.h>

Public Member Functions

 scoped_lock ()
 
 scoped_lock (recursive_mutex &)
 
void acquire (recursive_mutex &)
 
void release ()
 
 scoped_lock ()
 
 scoped_lock (recursive_mutex &in_rmutex)
 
 ~scoped_lock ()
 
void acquire (recursive_mutex &in_rmutex)
 
void release ()
 

Private Attributes

recursive_mutexrmutex
 

Detailed Description

Definition at line 155 of file threads_none.h.

Constructor & Destructor Documentation

◆ scoped_lock() [1/4]

libMesh::Threads::recursive_mutex::scoped_lock::scoped_lock ( )
inline

Definition at line 158 of file threads_none.h.

158 {}

◆ scoped_lock() [2/4]

libMesh::Threads::recursive_mutex::scoped_lock::scoped_lock ( recursive_mutex )
inlineexplicit

Definition at line 159 of file threads_none.h.

159 {}

◆ scoped_lock() [3/4]

libMesh::Threads::recursive_mutex::scoped_lock::scoped_lock ( )
inline

Definition at line 196 of file threads_pthread.h.

196 : rmutex(nullptr) {}

◆ scoped_lock() [4/4]

libMesh::Threads::recursive_mutex::scoped_lock::scoped_lock ( recursive_mutex in_rmutex)
inlineexplicit

Definition at line 197 of file threads_pthread.h.

197 : rmutex(&in_rmutex) { rmutex->lock(); }

References libMesh::Threads::recursive_mutex::lock(), and rmutex.

◆ ~scoped_lock()

libMesh::Threads::recursive_mutex::scoped_lock::~scoped_lock ( )
inline

Definition at line 199 of file threads_pthread.h.

199 { release(); }

References release().

Member Function Documentation

◆ acquire() [1/2]

void libMesh::Threads::recursive_mutex::scoped_lock::acquire ( recursive_mutex )
inline

Definition at line 160 of file threads_none.h.

160 {}

◆ acquire() [2/2]

void libMesh::Threads::recursive_mutex::scoped_lock::acquire ( recursive_mutex in_rmutex)
inline

Definition at line 201 of file threads_pthread.h.

201 { rmutex = &in_rmutex; rmutex->lock(); }

References libMesh::Threads::recursive_mutex::lock(), and rmutex.

◆ release() [1/2]

void libMesh::Threads::recursive_mutex::scoped_lock::release ( )
inline

Definition at line 161 of file threads_none.h.

161 {}

Referenced by ~scoped_lock().

◆ release() [2/2]

void libMesh::Threads::recursive_mutex::scoped_lock::release ( )
inline

Definition at line 202 of file threads_pthread.h.

202 { if (rmutex) rmutex->unlock(); rmutex = nullptr; }

References rmutex, and libMesh::Threads::recursive_mutex::unlock().

Member Data Documentation

◆ rmutex

recursive_mutex* libMesh::Threads::recursive_mutex::scoped_lock::rmutex
private

Definition at line 205 of file threads_pthread.h.

Referenced by acquire(), release(), and scoped_lock().


The documentation for this class was generated from the following files:
libMesh::Threads::recursive_mutex::unlock
void unlock()
Definition: threads_pthread.h:191
libMesh::Threads::recursive_mutex::scoped_lock::rmutex
recursive_mutex * rmutex
Definition: threads_pthread.h:205
libMesh::Threads::recursive_mutex::lock
void lock()
Definition: threads_pthread.h:190
libMesh::Threads::recursive_mutex::scoped_lock::release
void release()
Definition: threads_none.h:161