LLDB mainline
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
lldb_private::LockFileBase Class Referenceabstract

#include <LockFileBase.h>

Inheritance diagram for lldb_private::LockFileBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~LockFileBase ()=default
 
bool IsLocked () const
 
Status WriteLock (const uint64_t start, const uint64_t len)
 
Status TryWriteLock (const uint64_t start, const uint64_t len)
 
Status ReadLock (const uint64_t start, const uint64_t len)
 
Status TryReadLock (const uint64_t start, const uint64_t len)
 
Status Unlock ()
 

Protected Types

using Locker = std::function< Status(const uint64_t, const uint64_t)>
 

Protected Member Functions

 LockFileBase (int fd)
 
virtual bool IsValidFile () const
 
virtual Status DoWriteLock (const uint64_t start, const uint64_t len)=0
 
virtual Status DoTryWriteLock (const uint64_t start, const uint64_t len)=0
 
virtual Status DoReadLock (const uint64_t start, const uint64_t len)=0
 
virtual Status DoTryReadLock (const uint64_t start, const uint64_t len)=0
 
virtual Status DoUnlock ()=0
 
Status DoLock (const Locker &locker, const uint64_t start, const uint64_t len)
 

Protected Attributes

int m_fd
 
bool m_locked
 
uint64_t m_start
 
uint64_t m_len
 

Detailed Description

Definition at line 18 of file LockFileBase.h.

Member Typedef Documentation

◆ Locker

using lldb_private::LockFileBase::Locker = std::function<Status(const uint64_t, const uint64_t)>
protected

Definition at line 33 of file LockFileBase.h.

Constructor & Destructor Documentation

◆ ~LockFileBase()

virtual lldb_private::LockFileBase::~LockFileBase ( )
virtualdefault

◆ LockFileBase()

LockFileBase::LockFileBase ( int  fd)
protected

Definition at line 20 of file LockFileBase.cpp.

Member Function Documentation

◆ DoLock()

Status LockFileBase::DoLock ( const Locker locker,
const uint64_t  start,
const uint64_t  len 
)
protected

◆ DoReadLock()

virtual Status lldb_private::LockFileBase::DoReadLock ( const uint64_t  start,
const uint64_t  len 
)
protectedpure virtual

◆ DoTryReadLock()

virtual Status lldb_private::LockFileBase::DoTryReadLock ( const uint64_t  start,
const uint64_t  len 
)
protectedpure virtual

◆ DoTryWriteLock()

virtual Status lldb_private::LockFileBase::DoTryWriteLock ( const uint64_t  start,
const uint64_t  len 
)
protectedpure virtual

◆ DoUnlock()

virtual Status lldb_private::LockFileBase::DoUnlock ( )
protectedpure virtual

◆ DoWriteLock()

virtual Status lldb_private::LockFileBase::DoWriteLock ( const uint64_t  start,
const uint64_t  len 
)
protectedpure virtual

◆ IsLocked()

bool LockFileBase::IsLocked ( ) const

Definition at line 23 of file LockFileBase.cpp.

References m_locked.

Referenced by DoLock(), and Unlock().

◆ IsValidFile()

bool LockFileBase::IsValidFile ( ) const
protectedvirtual

Reimplemented in lldb_private::LockFileWindows.

Definition at line 62 of file LockFileBase.cpp.

References m_fd.

Referenced by DoLock(), and lldb_private::LockFileWindows::IsValidFile().

◆ ReadLock()

Status LockFileBase::ReadLock ( const uint64_t  start,
const uint64_t  len 
)

Definition at line 37 of file LockFileBase.cpp.

References DoLock(), and DoReadLock().

◆ TryReadLock()

Status LockFileBase::TryReadLock ( const uint64_t  start,
const uint64_t  len 
)

Definition at line 43 of file LockFileBase.cpp.

References DoLock(), and DoTryReadLock().

◆ TryWriteLock()

Status LockFileBase::TryWriteLock ( const uint64_t  start,
const uint64_t  len 
)

Definition at line 31 of file LockFileBase.cpp.

References DoLock(), and DoTryWriteLock().

◆ Unlock()

Status LockFileBase::Unlock ( )

◆ WriteLock()

Status LockFileBase::WriteLock ( const uint64_t  start,
const uint64_t  len 
)

Definition at line 25 of file LockFileBase.cpp.

References DoLock(), and DoWriteLock().

Member Data Documentation

◆ m_fd

int lldb_private::LockFileBase::m_fd
protected

◆ m_len

uint64_t lldb_private::LockFileBase::m_len
protected

◆ m_locked

bool lldb_private::LockFileBase::m_locked
protected

Definition at line 50 of file LockFileBase.h.

Referenced by DoLock(), IsLocked(), and Unlock().

◆ m_start

uint64_t lldb_private::LockFileBase::m_start
protected

Definition at line 51 of file LockFileBase.h.

Referenced by DoLock(), lldb_private::LockFilePosix::DoUnlock(), and Unlock().


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