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>

Collaboration diagram for lldb_private::QueueList:
Collaboration graph
[legend]

Public Types

typedef std::vector< lldb::QueueSP > collection
 
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. More...
 
lldb::QueueSP GetQueueAtIndex (uint32_t idx)
 Get the Queue at a given index number. More...
 
QueueIterable Queues ()
 Iterate over the list of queues. More...
 
void Clear ()
 Clear out the list of queues from the QueueList. More...
 
void AddQueue (lldb::QueueSP queue)
 Add a Queue to the QueueList. More...
 
lldb::QueueSP FindQueueByID (lldb::queue_id_t qid)
 Find a queue in the QueueList by QueueID. More...
 
lldb::QueueSP FindQueueByIndexID (uint32_t index_id)
 Find a queue in the QueueList by IndexID. More...
 
std::mutex & GetMutex ()
 

Protected Attributes

Processm_process
 The process that manages this queue list. More...
 
uint32_t m_stop_id
 The process stop ID that this queue list is valid for. More...
 
collection m_queues
 The queues for this process. More...
 
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

typedef std::vector<lldb::QueueSP> lldb_private::QueueList::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 Queues().

◆ 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::Flush(), Queues(), 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(), and Queues().

◆ 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().

Referenced by Queues().

◆ GetMutex()

std::mutex & QueueList::GetMutex ( )

Definition at line 69 of file QueueList.cpp.

References m_mutex.

Referenced by Queues().

◆ 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.

◆ 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 AddQueue(), Clear(), FindQueueByID(), FindQueueByIndexID(), GetMutex(), m_mutex, and m_queues.

Referenced by FindQueueByID(), and FindQueueByIndexID().

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: