summaryrefslogtreecommitdiff
path: root/source/Target/QueueList.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
commitf3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch)
tree48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/Target/QueueList.cpp
parent2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff)
Notes
Diffstat (limited to 'source/Target/QueueList.cpp')
-rw-r--r--source/Target/QueueList.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/source/Target/QueueList.cpp b/source/Target/QueueList.cpp
index 6134f5cc0b215..c63331db975a3 100644
--- a/source/Target/QueueList.cpp
+++ b/source/Target/QueueList.cpp
@@ -14,11 +14,7 @@
using namespace lldb;
using namespace lldb_private;
-QueueList::QueueList (Process *process) :
- m_process (process),
- m_stop_id (0),
- m_queues (),
- m_mutex ()
+QueueList::QueueList(Process *process) : m_process(process), m_stop_id(0), m_queues(), m_mutex()
{
}
@@ -30,14 +26,14 @@ QueueList::~QueueList ()
uint32_t
QueueList::GetSize ()
{
- Mutex::Locker locker (m_mutex);
+ std::lock_guard<std::mutex> guard(m_mutex);
return m_queues.size();
}
lldb::QueueSP
QueueList::GetQueueAtIndex (uint32_t idx)
{
- Mutex::Locker locker (m_mutex);
+ std::lock_guard<std::mutex> guard(m_mutex);
if (idx < m_queues.size())
{
return m_queues[idx];
@@ -51,14 +47,14 @@ QueueList::GetQueueAtIndex (uint32_t idx)
void
QueueList::Clear ()
{
- Mutex::Locker locker (m_mutex);
+ std::lock_guard<std::mutex> guard(m_mutex);
m_queues.clear();
}
void
QueueList::AddQueue (QueueSP queue_sp)
{
- Mutex::Locker locker (m_mutex);
+ std::lock_guard<std::mutex> guard(m_mutex);
if (queue_sp.get ())
{
m_queues.push_back (queue_sp);
@@ -95,8 +91,8 @@ QueueList::FindQueueByIndexID (uint32_t index_id)
return ret;
}
-lldb_private::Mutex &
-QueueList::GetMutex ()
+std::mutex &
+QueueList::GetMutex()
{
return m_mutex;
}