diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-05-18 01:59:10 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-05-18 01:59:10 +0000 |
commit | 16ff8604690ea63a3a82dd3b156061afb84dbcf1 (patch) | |
tree | a2d912258ecb0690f4a810ca1e438fc277160326 /lldb/source/Core/StreamCallback.cpp | |
parent | a36a61d46ac3f2ea10e78ac816bca5784bc8ba35 (diff) | |
download | bcm5719-llvm-16ff8604690ea63a3a82dd3b156061afb84dbcf1.tar.gz bcm5719-llvm-16ff8604690ea63a3a82dd3b156061afb84dbcf1.zip |
remove use of Mutex in favour of std::{,recursive_}mutex
This is a pretty straightforward first pass over removing a number of uses of
Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there
are interfaces which take Mutex::Locker & to lock internal locks. This patch
cleans up most of the easy cases. The only non-trivial change is in
CommandObjectTarget.cpp where a Mutex::Locker was split into two.
llvm-svn: 269877
Diffstat (limited to 'lldb/source/Core/StreamCallback.cpp')
-rw-r--r-- | lldb/source/Core/StreamCallback.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lldb/source/Core/StreamCallback.cpp b/lldb/source/Core/StreamCallback.cpp index d144b16755e..9f0adee2a15 100644 --- a/lldb/source/Core/StreamCallback.cpp +++ b/lldb/source/Core/StreamCallback.cpp @@ -18,13 +18,8 @@ using namespace lldb; using namespace lldb_private; - -StreamCallback::StreamCallback (lldb::LogOutputCallback callback, void *baton) : - Stream (0, 4, eByteOrderBig), - m_callback (callback), - m_baton (baton), - m_accumulated_data (), - m_collection_mutex () +StreamCallback::StreamCallback(lldb::LogOutputCallback callback, void *baton) + : Stream(0, 4, eByteOrderBig), m_callback(callback), m_baton(baton), m_accumulated_data(), m_collection_mutex() { } @@ -35,7 +30,7 @@ StreamCallback::~StreamCallback () StreamString & StreamCallback::FindStreamForThread(lldb::tid_t cur_tid) { - Mutex::Locker locker(m_collection_mutex); + std::lock_guard<std::mutex> guard(m_collection_mutex); collection::iterator iter = m_accumulated_data.find (cur_tid); if (iter == m_accumulated_data.end()) { |