LLDB  mainline
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::MainLoopPosix Class Reference

#include <MainLoopPosix.h>

Inheritance diagram for lldb_private::MainLoopPosix:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::MainLoopPosix:
Collaboration graph
[legend]

Classes

class  RunImpl
 
class  SignalHandle
 
struct  SignalInfo
 

Public Types

typedef std::unique_ptr< SignalHandleSignalHandleUP
 
- Public Types inherited from lldb_private::MainLoopBase
typedef std::unique_ptr< ReadHandleReadHandleUP
 
typedef std::function< void(MainLoopBase &)> Callback
 

Public Member Functions

 MainLoopPosix ()
 
 ~MainLoopPosix () override
 
ReadHandleUP RegisterReadObject (const lldb::IOObjectSP &object_sp, const Callback &callback, Status &error) override
 
SignalHandleUP RegisterSignal (int signo, const Callback &callback, Status &error)
 
Status Run () override
 
- Public Member Functions inherited from lldb_private::MainLoopBase
 MainLoopBase ()
 
virtual ~MainLoopBase ()=default
 
void AddPendingCallback (const Callback &callback)
 
virtual void RequestTermination ()
 

Protected Member Functions

void UnregisterReadObject (IOObject::WaitableHandle handle) override
 
void UnregisterSignal (int signo, std::list< Callback >::iterator callback_it)
 
void TriggerPendingCallbacks () override
 
- Protected Member Functions inherited from lldb_private::MainLoopBase
ReadHandleUP CreateReadHandle (const lldb::IOObjectSP &object_sp)
 
void ProcessPendingCallbacks ()
 

Private Member Functions

void ProcessReadObject (IOObject::WaitableHandle handle)
 
void ProcessSignal (int signo)
 

Private Attributes

llvm::DenseMap< IOObject::WaitableHandle, Callbackm_read_fds
 
llvm::DenseMap< int, SignalInfom_signals
 
Pipe m_trigger_pipe
 
std::atomic< bool > m_triggering
 

Additional Inherited Members

- Protected Attributes inherited from lldb_private::MainLoopBase
std::mutex m_callback_mutex
 
std::vector< Callbackm_pending_callbacks
 
bool m_terminate_request: 1
 

Detailed Description

Definition at line 27 of file MainLoopPosix.h.

Member Typedef Documentation

◆ SignalHandleUP

Definition at line 29 of file MainLoopPosix.h.

Constructor & Destructor Documentation

◆ MainLoopPosix()

MainLoopPosix::MainLoopPosix ( )

Definition at line 225 of file MainLoopPosix.cpp.

References error(), m_read_fds, m_trigger_pipe, and UNUSED_IF_ASSERT_DISABLED.

◆ ~MainLoopPosix()

MainLoopPosix::~MainLoopPosix ( )
override

Definition at line 244 of file MainLoopPosix.cpp.

References m_read_fds, m_signals, and m_trigger_pipe.

Member Function Documentation

◆ ProcessReadObject()

void MainLoopPosix::ProcessReadObject ( IOObject::WaitableHandle  handle)
private

Definition at line 380 of file MainLoopPosix.cpp.

References m_read_fds.

Referenced by lldb_private::MainLoopPosix::RunImpl::ProcessEvents().

◆ ProcessSignal()

void MainLoopPosix::ProcessSignal ( int  signo)
private

Definition at line 386 of file MainLoopPosix.cpp.

References m_signals.

Referenced by lldb_private::MainLoopPosix::RunImpl::ProcessEvents().

◆ RegisterReadObject()

MainLoopPosix::ReadHandleUP MainLoopPosix::RegisterReadObject ( const lldb::IOObjectSP &  object_sp,
const Callback callback,
Status error 
)
overridevirtual

◆ RegisterSignal()

MainLoopPosix::SignalHandleUP MainLoopPosix::RegisterSignal ( int  signo,
const Callback callback,
Status error 
)

◆ Run()

Status MainLoopPosix::Run ( )
overridevirtual

◆ TriggerPendingCallbacks()

void MainLoopPosix::TriggerPendingCallbacks ( )
overrideprotectedvirtual

◆ UnregisterReadObject()

void MainLoopPosix::UnregisterReadObject ( IOObject::WaitableHandle  handle)
overrideprotectedvirtual

Implements lldb_private::MainLoopBase.

Definition at line 322 of file MainLoopPosix.cpp.

References m_read_fds, and UNUSED_IF_ASSERT_DISABLED.

◆ UnregisterSignal()

void MainLoopPosix::UnregisterSignal ( int  signo,
std::list< Callback >::iterator  callback_it 
)
protected

Definition at line 328 of file MainLoopPosix.cpp.

References m_signals, and set().

Referenced by lldb_private::MainLoopPosix::SignalHandle::~SignalHandle().

Member Data Documentation

◆ m_read_fds

llvm::DenseMap<IOObject::WaitableHandle, Callback> lldb_private::MainLoopPosix::m_read_fds
private

◆ m_signals

llvm::DenseMap<int, SignalInfo> lldb_private::MainLoopPosix::m_signals
private

◆ m_trigger_pipe

Pipe lldb_private::MainLoopPosix::m_trigger_pipe
private

Definition at line 90 of file MainLoopPosix.h.

Referenced by MainLoopPosix(), TriggerPendingCallbacks(), and ~MainLoopPosix().

◆ m_triggering

std::atomic<bool> lldb_private::MainLoopPosix::m_triggering
private

Definition at line 91 of file MainLoopPosix.h.

Referenced by Run(), and TriggerPendingCallbacks().


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