Bitcoin Core  0.15.99
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CCriticalBlock Class Reference

Wrapper around std::unique_lock<CCriticalSection> More...

#include <sync.h>

Public Member Functions

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

Private Member Functions

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

Private Attributes

std::unique_lock< CCriticalSectionlock
 

Detailed Description

Wrapper around std::unique_lock<CCriticalSection>

Definition at line 116 of file sync.h.

Constructor & Destructor Documentation

CCriticalBlock::CCriticalBlock ( CCriticalSection mutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 144 of file sync.h.

CCriticalBlock::CCriticalBlock ( CCriticalSection pmutexIn,
const char *  pszName,
const char *  pszFile,
int  nLine,
bool  fTry = false 
)
inline

Definition at line 152 of file sync.h.

CCriticalBlock::~CCriticalBlock ( )
inline

Definition at line 163 of file sync.h.

Member Function Documentation

void CCriticalBlock::Enter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 121 of file sync.h.

CCriticalBlock::operator bool ( )
inline

Definition at line 169 of file sync.h.

bool CCriticalBlock::TryEnter ( const char *  pszName,
const char *  pszFile,
int  nLine 
)
inlineprivate

Definition at line 134 of file sync.h.

Member Data Documentation

std::unique_lock<CCriticalSection> CCriticalBlock::lock
private

Definition at line 119 of file sync.h.


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