LLDB mainline
lldb::SBMutex Class Reference

#include <SBMutex.h>

Classes

class  MutexVariant
 Holds either a standalone std::recursive_mutex (default-constructed SBMutex, no Target to resolve through) or a TargetAPIMutex (constructed from a Target). More...

Public Member Functions

 SBMutex ()
 SBMutex (const SBMutex &rhs)
const SBMutexoperator= (const SBMutex &rhs)
 ~SBMutex ()
bool IsValid () const
 Returns true if this lock has ownership of the underlying mutex.
void lock () const
 Blocking operation that takes ownership of this lock.
void unlock () const
 Releases ownership of this lock.
bool try_lock () const
 Tries to lock the mutex.

Private Member Functions

 SBMutex (lldb::TargetSP target_sp)

Private Attributes

std::shared_ptr< MutexVariantm_opaque_sp

Friends

class SBTarget

Detailed Description

Definition at line 18 of file SBMutex.h.

Constructor & Destructor Documentation

◆ SBMutex() [1/3]

SBMutex::SBMutex ( )

Definition at line 44 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by operator=(), and SBMutex().

◆ SBMutex() [2/3]

SBMutex::SBMutex ( const SBMutex & rhs)

Definition at line 48 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBMutex().

◆ ~SBMutex()

SBMutex::~SBMutex ( )

Definition at line 64 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBMutex() [3/3]

SBMutex::SBMutex ( lldb::TargetSP target_sp)
private

Definition at line 59 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Member Function Documentation

◆ IsValid()

bool SBMutex::IsValid ( ) const

Returns true if this lock has ownership of the underlying mutex.

Definition at line 66 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ lock()

void SBMutex::lock ( ) const

Blocking operation that takes ownership of this lock.

Definition at line 72 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ operator=()

const SBMutex & SBMutex::operator= ( const SBMutex & rhs)

Definition at line 52 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, m_opaque_sp, and SBMutex().

◆ try_lock()

bool SBMutex::try_lock ( ) const

Tries to lock the mutex.

Returns immediately. On successful lock acquisition returns true, otherwise returns false.

Definition at line 86 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ unlock()

void SBMutex::unlock ( ) const

Releases ownership of this lock.

Definition at line 79 of file SBMutex.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ SBTarget

friend class SBTarget
friend

Definition at line 42 of file SBMutex.h.

References SBTarget.

Referenced by SBTarget.

Member Data Documentation

◆ m_opaque_sp

std::shared_ptr<MutexVariant> lldb::SBMutex::m_opaque_sp
private

Definition at line 45 of file SBMutex.h.

Referenced by IsValid(), lock(), operator=(), SBMutex(), SBMutex(), SBMutex(), try_lock(), and unlock().


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