HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_AbortableLock< LOCKABLE > Class Template Reference

#include <UT_AbortableLock.h>

Public Types

using Scope = UT_UniqueLock< UT_AbortableLock >
 Use UT_AbortableLock::Scope for scope/exception safety. More...
 

Public Member Functions

 UT_AbortableLock ()
 
 ~UT_AbortableLock ()
 
bool safeLock ()
 Attempt lock on this mutex. Returns true on success, false if deadlock. More...
 
bool tryLock ()
 Tries the lock without blocking. Returns true if the lock was obtained. More...
 
void lock ()
 Locks the underlying mutex without testing for deadlocks. More...
 
void unlock ()
 Release lock. Undefined if it was not previously locked. More...
 
bool hasLock (int thread)
 Check if a thread has acquired this lock. More...
 
bool hasLock ()
 

Detailed Description

template<typename LOCKABLE>
class UT_AbortableLock< LOCKABLE >

A mutex class that supports dynamic deadlock detection amongst all instances of UT_AbortableLock.

Definition at line 84 of file UT_AbortableLock.h.

Member Typedef Documentation

template<typename LOCKABLE >
using UT_AbortableLock< LOCKABLE >::Scope = UT_UniqueLock<UT_AbortableLock>

Use UT_AbortableLock::Scope for scope/exception safety.

Definition at line 112 of file UT_AbortableLock.h.

Constructor & Destructor Documentation

template<typename LOCKABLE >
UT_AbortableLock< LOCKABLE >::UT_AbortableLock ( )
inline

Definition at line 87 of file UT_AbortableLock.h.

template<typename LOCKABLE >
UT_AbortableLock< LOCKABLE >::~UT_AbortableLock ( )
inline

Definition at line 88 of file UT_AbortableLock.h.

Member Function Documentation

template<typename LOCKABLE >
bool UT_AbortableLock< LOCKABLE >::hasLock ( int  thread)
inline

Check if a thread has acquired this lock.

Definition at line 97 of file UT_AbortableLockImpl.h.

template<typename LOCKABLE >
bool UT_AbortableLock< LOCKABLE >::hasLock ( )

Check if the current thread has acquired this lock. It is equivalent to hasLock(SYSgetSTID()).

Definition at line 104 of file UT_AbortableLockImpl.h.

template<typename LOCKABLE >
void UT_AbortableLock< LOCKABLE >::lock ( )

Locks the underlying mutex without testing for deadlocks.

Definition at line 81 of file UT_AbortableLockImpl.h.

template<typename LOCKABLE >
bool UT_AbortableLock< LOCKABLE >::safeLock ( )

Attempt lock on this mutex. Returns true on success, false if deadlock.

Definition at line 21 of file UT_AbortableLockImpl.h.

template<typename LOCKABLE >
bool UT_AbortableLock< LOCKABLE >::tryLock ( )

Tries the lock without blocking. Returns true if the lock was obtained.

Definition at line 68 of file UT_AbortableLockImpl.h.

template<typename LOCKABLE >
void UT_AbortableLock< LOCKABLE >::unlock ( )

Release lock. Undefined if it was not previously locked.

Definition at line 89 of file UT_AbortableLockImpl.h.


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