LLDB mainline
lldb_private::ProcessRunLock Class Reference

A class used to prevent the process from starting while other threads are accessing its data, and prevent access to its data while it is running. More...

#include "lldb/Host/ProcessRunLock.h"

Classes

class  ProcessRunLocker

Public Member Functions

 ProcessRunLock ()
 ~ProcessRunLock ()
bool ReadTryLock ()
bool ReadUnlock ()
bool SetRunning ()
 Set the process to running.
bool SetStopped ()
 Set the process to stopped.

Protected Attributes

lldb::rwlock_t m_rwlock
bool m_running = false

Private Member Functions

 ProcessRunLock (const ProcessRunLock &)=delete
const ProcessRunLockoperator= (const ProcessRunLock &)=delete

Detailed Description

A class used to prevent the process from starting while other threads are accessing its data, and prevent access to its data while it is running.

Definition at line 25 of file ProcessRunLock.h.

Constructor & Destructor Documentation

◆ ProcessRunLock() [1/2]

ProcessRunLock::ProcessRunLock ( )

◆ ~ProcessRunLock()

ProcessRunLock::~ProcessRunLock ( )

Definition at line 19 of file common/ProcessRunLock.cpp.

References m_rwlock.

◆ ProcessRunLock() [2/2]

lldb_private::ProcessRunLock::ProcessRunLock ( const ProcessRunLock & )
privatedelete

References ProcessRunLock().

Member Function Documentation

◆ operator=()

const ProcessRunLock & lldb_private::ProcessRunLock::operator= ( const ProcessRunLock & )
privatedelete

References ProcessRunLock().

◆ ReadTryLock()

bool ProcessRunLock::ReadTryLock ( )

◆ ReadUnlock()

bool ProcessRunLock::ReadUnlock ( )

Definition at line 34 of file common/ProcessRunLock.cpp.

References m_rwlock.

◆ SetRunning()

bool ProcessRunLock::SetRunning ( )

Set the process to running.

Returns true if the process was stopped. Return false if the process was running.

Definition at line 38 of file common/ProcessRunLock.cpp.

References m_running, and m_rwlock.

◆ SetStopped()

bool ProcessRunLock::SetStopped ( )

Set the process to stopped.

Returns true if the process was running. Returns false if the process was stopped.

Definition at line 46 of file common/ProcessRunLock.cpp.

References m_running, and m_rwlock.

Member Data Documentation

◆ m_running

bool lldb_private::ProcessRunLock::m_running = false
protected

Definition at line 94 of file ProcessRunLock.h.

Referenced by ReadTryLock(), SetRunning(), and SetStopped().

◆ m_rwlock

lldb::rwlock_t lldb_private::ProcessRunLock::m_rwlock
protected

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