1 //===-- QueueList.cpp -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/Target/Process.h"
11 #include "lldb/Target/Queue.h"
12 #include "lldb/Target/QueueList.h"
15 using namespace lldb_private;
17 QueueList::QueueList (Process *process) :
25 QueueList::~QueueList ()
33 Mutex::Locker locker (m_mutex);
34 return m_queues.size();
38 QueueList::GetQueueAtIndex (uint32_t idx)
40 Mutex::Locker locker (m_mutex);
41 if (idx < m_queues.size())
54 Mutex::Locker locker (m_mutex);
59 QueueList::AddQueue (QueueSP queue_sp)
61 Mutex::Locker locker (m_mutex);
64 m_queues.push_back (queue_sp);
69 QueueList::FindQueueByID (lldb::queue_id_t qid)
72 for (QueueSP queue_sp : Queues())
74 if (queue_sp->GetID() == qid)
84 QueueList::FindQueueByIndexID (uint32_t index_id)
87 for (QueueSP queue_sp : Queues())
89 if (queue_sp->GetIndexID() == index_id)
99 QueueList::GetMutex ()