Bitcoin Core 29.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
mp::Lock Class Reference

#include <util.h>

Public Member Functions

 Lock (Mutex &m) MP_ACQUIRE(m)
 
 ~Lock () MP_RELEASE()=default
 
void unlock () MP_RELEASE()
 
void lock () MP_ACQUIRE()
 
void assert_locked (Mutex &mutex) MP_ASSERT_CAPABILITY() MP_ASSERT_CAPABILITY(mutex)
 

Public Attributes

std::unique_lock< std::mutex > m_lock
 

Detailed Description

Definition at line 170 of file util.h.

Constructor & Destructor Documentation

◆ Lock()

mp::Lock::Lock ( Mutex m)
inlineexplicit

Definition at line 172 of file util.h.

◆ ~Lock()

mp::Lock::~Lock ( )
default

Member Function Documentation

◆ assert_locked()

void mp::Lock::assert_locked ( Mutex mutex)
inline

Definition at line 176 of file util.h.

Here is the call graph for this function:

◆ lock()

void mp::Lock::lock ( )
inline

Definition at line 175 of file util.h.

Here is the caller graph for this function:

◆ unlock()

void mp::Lock::unlock ( )
inline

Definition at line 174 of file util.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m_lock

std::unique_lock<std::mutex> mp::Lock::m_lock

Definition at line 182 of file util.h.


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