The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LockGuard< Mutex > Class Reference

#include <LockGuard.h>

+ Collaboration diagram for LockGuard< Mutex >:

Public Member Functions

 LockGuard (Mutex &Lock, bool Condition=true)
 
void disown ()
 
bool ownsLock () const
 

Private Member Functions

 NOT_COPYABLE_OR_ASSIGNABLE (LockGuard)
 

Private Attributes

TerminationDeferral m_TerminationDeferral
 
Mutexm_Lock
 
bool m_bCondition
 

Detailed Description

Mutex ownership cannot be abandoned by an outer interruption marker. Terminal teardown remains deferred until after the owned mutex is released.

Definition at line 91 of file LockGuard.h.

Constructor & Destructor Documentation

◆ LockGuard()

LockGuard< Mutex >::LockGuard ( Mutex Lock,
bool  Condition = true 
)
explicit

Definition at line 31 of file LockGuard.cc.

◆ ~LockGuard()

Definition at line 40 of file LockGuard.cc.

Member Function Documentation

◆ disown()

void LockGuard< Mutex >::disown ( )

Transfers release responsibility to the caller and ends this guard's lifetime barrier. The caller must already have released the mutex or provide its own barrier while retaining ownership.

Definition at line 46 of file LockGuard.cc.

◆ ownsLock()

bool LockGuard< Mutex >::ownsLock ( ) const
inline

Definition at line 103 of file LockGuard.h.

Member Data Documentation

◆ m_bCondition

bool LockGuard< Mutex >::m_bCondition
private

Definition at line 113 of file LockGuard.h.

◆ m_Lock

Mutex& LockGuard< Mutex >::m_Lock
private

Definition at line 112 of file LockGuard.h.

◆ m_TerminationDeferral

TerminationDeferral LockGuard< Mutex >::m_TerminationDeferral
private

Definition at line 111 of file LockGuard.h.


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