Bitcoin Core  27.99.0
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 () noexcept
 
void Release () noexcept
 
bool TryAcquire () noexcept
 
 CSemaphoreGrant (const CSemaphoreGrant &)=delete
 
CSemaphoreGrantoperator= (const CSemaphoreGrant &)=delete
 
 CSemaphoreGrant (CSemaphoreGrant &&other) noexcept
 
CSemaphoreGrantoperator= (CSemaphoreGrant &&other) noexcept
 
 CSemaphoreGrant () noexcept
 
 CSemaphoreGrant (CSemaphore &sema, bool fTry=false) noexcept
 
 ~CSemaphoreGrant ()
 
 operator bool () const noexcept
 

Private Attributes

CSemaphoresem
 
bool fHaveGrant
 

Detailed Description

RAII-style semaphore lock.

Definition at line 352 of file sync.h.

Constructor & Destructor Documentation

◆ CSemaphoreGrant() [1/4]

CSemaphoreGrant::CSemaphoreGrant ( const CSemaphoreGrant )
delete

◆ CSemaphoreGrant() [2/4]

CSemaphoreGrant::CSemaphoreGrant ( CSemaphoreGrant &&  other)
inlinenoexcept

Definition at line 390 of file sync.h.

◆ CSemaphoreGrant() [3/4]

CSemaphoreGrant::CSemaphoreGrant ( )
inlinenoexcept

Definition at line 408 of file sync.h.

◆ CSemaphoreGrant() [4/4]

CSemaphoreGrant::CSemaphoreGrant ( CSemaphore sema,
bool  fTry = false 
)
inlineexplicitnoexcept

Definition at line 410 of file sync.h.

Here is the call graph for this function:

◆ ~CSemaphoreGrant()

CSemaphoreGrant::~CSemaphoreGrant ( )
inline

Definition at line 419 of file sync.h.

Here is the call graph for this function:

Member Function Documentation

◆ Acquire()

void CSemaphoreGrant::Acquire ( )
inlinenoexcept

Definition at line 359 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
inlineexplicitnoexcept

Definition at line 424 of file sync.h.

◆ operator=() [1/2]

CSemaphoreGrant& CSemaphoreGrant::operator= ( const CSemaphoreGrant )
delete

◆ operator=() [2/2]

CSemaphoreGrant& CSemaphoreGrant::operator= ( CSemaphoreGrant &&  other)
inlinenoexcept

Definition at line 398 of file sync.h.

Here is the call graph for this function:

◆ Release()

void CSemaphoreGrant::Release ( )
inlinenoexcept

Definition at line 368 of file sync.h.

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

◆ TryAcquire()

bool CSemaphoreGrant::TryAcquire ( )
inlinenoexcept

Definition at line 377 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 356 of file sync.h.

◆ sem

CSemaphore* CSemaphoreGrant::sem
private

Definition at line 355 of file sync.h.


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