Bitcoin ABC  0.28.12
P2P Digital Currency
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Friends | List of all members
UniqueLock< Mutex, Base > Class Template Reference

Wrapper around std::unique_lock style lock for Mutex. More...

#include <sync.h>

Inheritance diagram for UniqueLock< Mutex, Base >:
[legend]
Collaboration diagram for UniqueLock< Mutex, Base >:
[legend]

Classes

class  reverse_lock
 An RAII-style reverse lock. More...
 

Public Member Functions

 UniqueLock (Mutex &mutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(mutexIn)
 
 UniqueLock (Mutex *pmutexIn, const char *pszName, const char *pszFile, int nLine, bool fTry=false) EXCLUSIVE_LOCK_FUNCTION(pmutexIn)
 
 ~UniqueLock () UNLOCK_FUNCTION()
 
 operator bool ()
 

Protected Member Functions

 UniqueLock ()
 

Private Member Functions

void Enter (const char *pszName, const char *pszFile, int nLine)
 
bool TryEnter (const char *pszName, const char *pszFile, int nLine)
 

Friends

class reverse_lock
 

Detailed Description

template<typename Mutex, typename Base = typename Mutex::UniqueLock>
class UniqueLock< Mutex, Base >

Wrapper around std::unique_lock style lock for Mutex.

Definition at line 168 of file sync.h.

Constructor & Destructor Documentation

◆ UniqueLock() [1/3]

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
UniqueLock< Mutex, Base >::UniqueLock ( Mutex mutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 193 of file sync.h.

◆ UniqueLock() [2/3]

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
UniqueLock< Mutex, Base >::UniqueLock ( Mutex pmutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 203 of file sync.h.

◆ ~UniqueLock()

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
UniqueLock< Mutex, Base >::~UniqueLock ( )
inline

Definition at line 217 of file sync.h.

Here is the call graph for this function:

◆ UniqueLock() [3/3]

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
UniqueLock< Mutex, Base >::UniqueLock ( )
inlineprotected

Definition at line 227 of file sync.h.

Member Function Documentation

◆ Enter()

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
void UniqueLock< Mutex, Base >::Enter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 170 of file sync.h.

Here is the call graph for this function:

◆ operator bool()

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
UniqueLock< Mutex, Base >::operator bool ( )
inline

Definition at line 223 of file sync.h.

◆ TryEnter()

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
bool UniqueLock< Mutex, Base >::TryEnter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 183 of file sync.h.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ reverse_lock

template<typename Mutex , typename Base = typename Mutex::UniqueLock>
friend class reverse_lock
friend

Definition at line 262 of file sync.h.


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