OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lockmgr::TrackedRefLock< LOCK > Class Template Reference

#include <LockMgrImpl.h>

+ Collaboration diagram for lockmgr::TrackedRefLock< LOCK >:

Public Member Functions

 TrackedRefLock (MutexTracker *m)
 
 ~TrackedRefLock ()
 
 TrackedRefLock (TrackedRefLock &&other)
 
 TrackedRefLock (const TrackedRefLock &)=delete
 
TrackedRefLockoperator= (const TrackedRefLock &)=delete
 

Private Attributes

MutexTrackermutex_
 
LOCK lock_
 

Detailed Description

template<typename LOCK>
class lockmgr::TrackedRefLock< LOCK >

Definition at line 58 of file LockMgrImpl.h.

Constructor & Destructor Documentation

template<typename LOCK >
lockmgr::TrackedRefLock< LOCK >::TrackedRefLock ( MutexTracker m)
inline

Definition at line 60 of file LockMgrImpl.h.

References CHECK, and lockmgr::TrackedRefLock< LOCK >::mutex_.

60 : mutex_(m), lock_(mutex_->acquire()) { CHECK(mutex_); }
#define CHECK(condition)
Definition: Logger.h:197
MutexTracker * mutex_
Definition: LockMgrImpl.h:79
MutexTypeBase & acquire()
Definition: LockMgrImpl.h:40
template<typename LOCK >
lockmgr::TrackedRefLock< LOCK >::~TrackedRefLock ( )
inline

Definition at line 62 of file LockMgrImpl.h.

References lockmgr::TrackedRefLock< LOCK >::mutex_, and lockmgr::MutexTracker::release().

62  {
63  if (mutex_) {
64  // This call only decrements the ref count. The actual unlock is done once the
65  // lock is destroyed.
66  mutex_->release();
67  }
68  }
MutexTracker * mutex_
Definition: LockMgrImpl.h:79

+ Here is the call graph for this function:

template<typename LOCK >
lockmgr::TrackedRefLock< LOCK >::TrackedRefLock ( TrackedRefLock< LOCK > &&  other)
inline

Definition at line 70 of file LockMgrImpl.h.

71  : mutex_(other.mutex_), lock_(std::move(other.lock_)) {
72  other.mutex_ = nullptr;
73  }
MutexTracker * mutex_
Definition: LockMgrImpl.h:79
template<typename LOCK >
lockmgr::TrackedRefLock< LOCK >::TrackedRefLock ( const TrackedRefLock< LOCK > &  )
delete

Member Function Documentation

template<typename LOCK >
TrackedRefLock& lockmgr::TrackedRefLock< LOCK >::operator= ( const TrackedRefLock< LOCK > &  )
delete

Member Data Documentation

template<typename LOCK >
LOCK lockmgr::TrackedRefLock< LOCK >::lock_
private

Definition at line 80 of file LockMgrImpl.h.

template<typename LOCK >
MutexTracker* lockmgr::TrackedRefLock< LOCK >::mutex_
private

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