Bitcoin ABC 0.34.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CSemaphoreGrant Class Reference

RAII-style semaphore lock. More...

#include <sync.h>

Collaboration diagram for CSemaphoreGrant:
[legend]

Public Member Functions

void Acquire ()
 
void Release ()
 
bool TryAcquire ()
 
void MoveTo (CSemaphoreGrant &grant)
 
 CSemaphoreGrant ()
 
 CSemaphoreGrant (CSemaphore &sema, bool fTry=false)
 
 ~CSemaphoreGrant ()
 
 operator bool () const
 

Private Attributes

CSemaphore * sem
 
bool fHaveGrant
 

Detailed Description

RAII-style semaphore lock.

Definition at line 383 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphoreGrant() [1/2]

CSemaphoreGrant::CSemaphoreGrant ( )
inline

Definition at line 419 of file sync.h.

◆ CSemaphoreGrant() [2/2]

CSemaphoreGrant::CSemaphoreGrant ( CSemaphore &  sema,
bool  fTry = false 
)
inlineexplicit

Definition at line 421 of file sync.h.

Here is the call graph for this function:

◆ ~CSemaphoreGrant()

CSemaphoreGrant::~CSemaphoreGrant ( )
inline

Definition at line 430 of file sync.h.

Here is the call graph for this function:

Member Function Documentation

◆ Acquire()

void CSemaphoreGrant::Acquire ( )
inline

Definition at line 389 of file sync.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MoveTo()

void CSemaphoreGrant::MoveTo ( CSemaphoreGrant &  grant)
inline

Definition at line 412 of file sync.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

CSemaphoreGrant::operator bool ( ) const
inline

Definition at line 432 of file sync.h.

◆ Release()

void CSemaphoreGrant::Release ( )
inline

Definition at line 397 of file sync.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryAcquire()

bool CSemaphoreGrant::TryAcquire ( )
inline

Definition at line 405 of file sync.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fHaveGrant

bool CSemaphoreGrant::fHaveGrant
private

Definition at line 386 of file sync.h.

◆ sem

CSemaphore* CSemaphoreGrant::sem
private

Definition at line 385 of file sync.h.


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