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

#include <QueueList.h>

Public Types

typedef std::vector< lldb::QueueSPcollection
 
typedef LockingAdaptedIterable< collection, lldb::QueueSP, vector_adapter, std::mutex > QueueIterable
 

Public Member Functions

 QueueList (Process *process)
 
 ~QueueList ()
 
uint32_t GetSize ()
 Get the number of libdispatch queues that are available.
 
lldb::QueueSP GetQueueAtIndex (uint32_t idx)
 Get the Queue at a given index number.
 
QueueIterable Queues ()
 Iterate over the list of queues.
 
void Clear ()
 Clear out the list of queues from the QueueList.
 
void AddQueue (lldb::QueueSP queue)
 Add a Queue to the QueueList.
 
lldb::QueueSP FindQueueByID (lldb::queue_id_t qid)
 Find a queue in the QueueList by QueueID.
 
lldb::QueueSP FindQueueByIndexID (uint32_t index_id)
 Find a queue in the QueueList by IndexID.
 
std::mutex & GetMutex ()
 

Protected Attributes

Processm_process
 The process that manages this queue list.
 
uint32_t m_stop_id
 The process stop ID that this queue list is valid for.
 
collection m_queues
 The queues for this process.
 
std::mutex m_mutex
 

Private Member Functions

 QueueList ()=delete
 

Friends

class Process
 

Detailed Description

Definition at line 28 of file QueueList.h.

Member Typedef Documentation

◆ collection

Definition at line 50 of file QueueList.h.

◆ QueueIterable

Definition at line 53 of file QueueList.h.

Constructor & Destructor Documentation

◆ QueueList() [1/2]

QueueList::QueueList ( Process process)

Definition at line 16 of file QueueList.cpp.

◆ ~QueueList()

QueueList::~QueueList ( )

Definition at line 19 of file QueueList.cpp.

References Clear().

◆ QueueList() [2/2]

lldb_private::QueueList::QueueList ( )
privatedelete

Member Function Documentation

◆ AddQueue()

void QueueList::AddQueue ( lldb::QueueSP  queue)

Add a Queue to the QueueList.

Parameters
[in]queueUsed by the SystemRuntime to populate the QueueList

Definition at line 40 of file QueueList.cpp.

References m_mutex, and m_queues.

Referenced by SystemRuntimeMacOSX::PopulateQueueList(), SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR(), and lldb_private::ScriptedProcess::UpdateQueueListIfNeeded().

◆ Clear()

void QueueList::Clear ( )

Clear out the list of queues from the QueueList.

Definition at line 35 of file QueueList.cpp.

References m_mutex, and m_queues.

Referenced by lldb_private::Process::Finalize(), lldb_private::Process::Flush(), lldb_private::Process::UpdateThreadListIfNeeded(), and ~QueueList().

◆ FindQueueByID()

lldb::QueueSP QueueList::FindQueueByID ( lldb::queue_id_t  qid)

Find a queue in the QueueList by QueueID.

Parameters
[in]qidThe QueueID (same as returned by Thread::GetQueueID()) to find.
Returns
A QueueSP to the queue requested, if it is present in the QueueList. An empty QueueSP will be returned if this queue was not found.

Definition at line 47 of file QueueList.cpp.

References Queues().

Referenced by SystemRuntimeMacOSX::PopulateQueueList().

◆ FindQueueByIndexID()

lldb::QueueSP QueueList::FindQueueByIndexID ( uint32_t  index_id)

Find a queue in the QueueList by IndexID.

Parameters
[in]index_idFind a queue by IndexID. This is an integer associated with each unique queue seen during a debug session and will not be reused for a different queue. Unlike the QueueID, a 64-bit value, this will tend to be an integral value like 1 or 7.
Returns
A QueueSP to the queue requested, if it is present in the QueueList. An empty QueueSP will be returned if this queue was not found.

Definition at line 58 of file QueueList.cpp.

References Queues().

◆ GetMutex()

std::mutex & QueueList::GetMutex ( )

Definition at line 69 of file QueueList.cpp.

References m_mutex.

◆ GetQueueAtIndex()

lldb::QueueSP QueueList::GetQueueAtIndex ( uint32_t  idx)

Get the Queue at a given index number.

Parameters
[in]idxThe index number (0-based) of the queue.
Returns
The Queue at that index number.

Definition at line 26 of file QueueList.cpp.

References m_mutex, and m_queues.

◆ GetSize()

uint32_t QueueList::GetSize ( )

Get the number of libdispatch queues that are available.

Returns
The number of queues that are stored in the QueueList.

Definition at line 21 of file QueueList.cpp.

References m_mutex, and m_queues.

Referenced by lldb_private::Process::UpdateQueueListIfNeeded().

◆ Queues()

QueueIterable lldb_private::QueueList::Queues ( )
inline

Iterate over the list of queues.

Returns
An Iterable object which can be used to loop over the queues that exist.

Definition at line 60 of file QueueList.h.

References m_mutex, and m_queues.

Referenced by FindQueueByID(), FindQueueByIndexID(), and lldb_private::Process::Queues().

Friends And Related Function Documentation

◆ Process

friend class Process
friend

Definition at line 29 of file QueueList.h.

Member Data Documentation

◆ m_mutex

std::mutex lldb_private::QueueList::m_mutex
protected

Definition at line 102 of file QueueList.h.

Referenced by AddQueue(), Clear(), GetMutex(), GetQueueAtIndex(), GetSize(), and Queues().

◆ m_process

Process* lldb_private::QueueList::m_process
protected

The process that manages this queue list.

Definition at line 98 of file QueueList.h.

◆ m_queues

collection lldb_private::QueueList::m_queues
protected

The queues for this process.

Definition at line 101 of file QueueList.h.

Referenced by AddQueue(), Clear(), GetQueueAtIndex(), GetSize(), and Queues().

◆ m_stop_id

uint32_t lldb_private::QueueList::m_stop_id
protected

The process stop ID that this queue list is valid for.

Definition at line 100 of file QueueList.h.


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