summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-05-18 01:59:10 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-05-18 01:59:10 +0000
commit16ff8604690ea63a3a82dd3b156061afb84dbcf1 (patch)
treea2d912258ecb0690f4a810ca1e438fc277160326 /lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
parenta36a61d46ac3f2ea10e78ac816bca5784bc8ba35 (diff)
downloadbcm5719-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/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
index 37af5b83019..9ec36b383af 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
@@ -83,25 +83,25 @@ SystemRuntimeMacOSX::CreateInstance (Process* process)
//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
-SystemRuntimeMacOSX::SystemRuntimeMacOSX (Process* process) :
- SystemRuntime(process),
- m_break_id(LLDB_INVALID_BREAK_ID),
- m_mutex(Mutex::eMutexTypeRecursive),
- m_get_queues_handler(process),
- m_get_pending_items_handler(process),
- m_get_item_info_handler(process),
- m_get_thread_item_info_handler(process),
- m_page_to_free(LLDB_INVALID_ADDRESS),
- m_page_to_free_size(0),
- m_lib_backtrace_recording_info(),
- m_dispatch_queue_offsets_addr (LLDB_INVALID_ADDRESS),
- m_libdispatch_offsets(),
- m_libpthread_layout_offsets_addr (LLDB_INVALID_ADDRESS),
- m_libpthread_offsets(),
- m_dispatch_tsd_indexes_addr (LLDB_INVALID_ADDRESS),
- m_libdispatch_tsd_indexes(),
- m_dispatch_voucher_offsets_addr (LLDB_INVALID_ADDRESS),
- m_libdispatch_voucher_offsets()
+SystemRuntimeMacOSX::SystemRuntimeMacOSX(Process *process)
+ : SystemRuntime(process),
+ m_break_id(LLDB_INVALID_BREAK_ID),
+ m_mutex(),
+ m_get_queues_handler(process),
+ m_get_pending_items_handler(process),
+ m_get_item_info_handler(process),
+ m_get_thread_item_info_handler(process),
+ m_page_to_free(LLDB_INVALID_ADDRESS),
+ m_page_to_free_size(0),
+ m_lib_backtrace_recording_info(),
+ m_dispatch_queue_offsets_addr(LLDB_INVALID_ADDRESS),
+ m_libdispatch_offsets(),
+ m_libpthread_layout_offsets_addr(LLDB_INVALID_ADDRESS),
+ m_libpthread_offsets(),
+ m_dispatch_tsd_indexes_addr(LLDB_INVALID_ADDRESS),
+ m_libdispatch_tsd_indexes(),
+ m_dispatch_voucher_offsets_addr(LLDB_INVALID_ADDRESS),
+ m_libdispatch_voucher_offsets()
{
}
@@ -128,7 +128,7 @@ SystemRuntimeMacOSX::Detach ()
void
SystemRuntimeMacOSX::Clear (bool clear_process)
{
- Mutex::Locker locker(m_mutex);
+ std::lock_guard<std::recursive_mutex> guard(m_mutex);
if (m_process->IsAlive() && LLDB_BREAK_ID_IS_VALID(m_break_id))
m_process->ClearBreakpointSiteByID(m_break_id);
OpenPOWER on IntegriCloud