Personally I'm strongly in favor of standardizing on builtin language constructs.<br><br>We already use std mutex in some places, and llvm does too, so i see no issue with compiler support.  I can't review the patch at the moment, but please do make sure it's clang formatted<br><div class="gmail_quote"><div dir="ltr">On Sun, May 15, 2016 at 6:10 PM Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">compnerd created this revision.<br>
compnerd added reviewers: clayborg, zturner.<br>
compnerd added a subscriber: lldb-commits.<br>
Herald added a subscriber: emaste.<br>
<br>
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.<br>
<br>
Although the patch is trivial, the question that I have is whether we should go ahead with this change and if doing it in multiple passes is reasonable.<br>
<br>
<a href="http://reviews.llvm.org/D20278" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20278</a><br>
<br>
Files:<br>
  include/lldb/Breakpoint/BreakpointLocationList.h<br>
  include/lldb/Breakpoint/BreakpointSite.h<br>
  include/lldb/Breakpoint/BreakpointSiteList.h<br>
  include/lldb/Core/Broadcaster.h<br>
  include/lldb/Core/Communication.h<br>
  include/lldb/Core/History.h<br>
  include/lldb/Core/IOHandler.h<br>
  include/lldb/Core/Listener.h<br>
  include/lldb/Core/Module.h<br>
  include/lldb/Core/ModuleSpec.h<br>
  include/lldb/Core/StreamTee.h<br>
  include/lldb/Core/ThreadSafeSTLMap.h<br>
  include/lldb/Core/ThreadSafeValue.h<br>
  include/lldb/Core/ValueObject.h<br>
  include/lldb/DataFormatters/FormatCache.h<br>
  include/lldb/DataFormatters/FormatManager.h<br>
  include/lldb/DataFormatters/FormattersContainer.h<br>
  include/lldb/DataFormatters/TypeCategory.h<br>
  include/lldb/DataFormatters/TypeCategoryMap.h<br>
  include/lldb/Host/Editline.h<br>
  include/lldb/Host/common/NativeBreakpointList.h<br>
  include/lldb/Host/common/NativeProcessProtocol.h<br>
  include/lldb/Host/posix/ConnectionFileDescriptorPosix.h<br>
  include/lldb/Initialization/SystemLifetimeManager.h<br>
  include/lldb/Interpreter/CommandHistory.h<br>
  include/lldb/Symbol/FuncUnwinders.h<br>
  include/lldb/Target/JITLoaderList.h<br>
  include/lldb/Target/Platform.h<br>
  include/lldb/Target/SectionLoadHistory.h<br>
  include/lldb/Target/SectionLoadList.h<br>
  include/lldb/Target/TargetList.h<br>
  include/lldb/Target/Thread.h<br>
  include/lldb/Target/ThreadPlan.h<br>
  include/lldb/Target/Unwind.h<br>
  include/lldb/Utility/SharedCluster.h<br>
  source/API/SBDebugger.cpp<br>
  source/Breakpoint/BreakpointLocationList.cpp<br>
  source/Breakpoint/BreakpointSite.cpp<br>
  source/Breakpoint/BreakpointSiteList.cpp<br>
  source/Commands/CommandObjectTarget.cpp<br>
  source/Core/Broadcaster.cpp<br>
  source/Core/Communication.cpp<br>
  source/Core/Debugger.cpp<br>
  source/Core/IOHandler.cpp<br>
  source/Core/Listener.cpp<br>
  source/Core/Log.cpp<br>
  source/Core/Module.cpp<br>
  source/Core/PluginManager.cpp<br>
  source/Core/Timer.cpp<br>
  source/DataFormatters/FormatCache.cpp<br>
  source/DataFormatters/FormatManager.cpp<br>
  source/DataFormatters/TypeCategory.cpp<br>
  source/DataFormatters/TypeCategoryMap.cpp<br>
  source/Expression/IRExecutionUnit.cpp<br>
  source/Host/common/Editline.cpp<br>
  source/Host/common/NativeBreakpointList.cpp<br>
  source/Host/common/NativeProcessProtocol.cpp<br>
  source/Host/posix/ConnectionFileDescriptorPosix.cpp<br>
  source/Initialization/SystemLifetimeManager.cpp<br>
  source/Interpreter/CommandHistory.cpp<br>
  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp<br>
  source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h<br>
  source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp<br>
  source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h<br>
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp<br>
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h<br>
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp<br>
  source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h<br>
  source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp<br>
  source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h<br>
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp<br>
  source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp<br>
  source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp<br>
  source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp<br>
  source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp<br>
  source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp<br>
  source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp<br>
  source/Plugins/Platform/MacOSX/PlatformDarwin.cpp<br>
  source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp<br>
  source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp<br>
  source/Plugins/Process/FreeBSD/ProcessFreeBSD.h<br>
  source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp<br>
  source/Plugins/Process/Utility/HistoryUnwind.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp<br>
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h<br>
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp<br>
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.h<br>
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp<br>
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp<br>
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp<br>
  source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp<br>
  source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h<br>
  source/Symbol/FuncUnwinders.cpp<br>
  source/Symbol/ObjectFile.cpp<br>
  source/Symbol/SymbolVendor.cpp<br>
  source/Target/JITLoaderList.cpp<br>
  source/Target/Platform.cpp<br>
  source/Target/Process.cpp<br>
  source/Target/SectionLoadHistory.cpp<br>
  source/Target/SectionLoadList.cpp<br>
  source/Target/TargetList.cpp<br>
  source/Target/Thread.cpp<br>
  source/Target/ThreadPlan.cpp<br>
  source/Utility/SharingPtr.cpp<br>
<br>
</blockquote></div>