diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/Utility/SharingPtr.cpp | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) |
Notes
Diffstat (limited to 'source/Utility/SharingPtr.cpp')
-rw-r--r-- | source/Utility/SharingPtr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Utility/SharingPtr.cpp b/source/Utility/SharingPtr.cpp index 7f1278567ff11..7eedeb08afd1f 100644 --- a/source/Utility/SharingPtr.cpp +++ b/source/Utility/SharingPtr.cpp @@ -14,12 +14,12 @@ // If ENABLE_SP_LOGGING is defined, then log all shared pointer assignments // and allow them to be queried using a pointer by a call to: #include <execinfo.h> -#include <map> #include <assert.h> -#include "lldb/Host/Mutex.h" #include "llvm/ADT/STLExtras.h" +#include <map> +#include <mutex> #include <vector> class Backtrace @@ -70,8 +70,8 @@ extern "C" void track_sp (void *sp_this, void *ptr, long use_count) { typedef std::pair<void *, Backtrace> PtrBacktracePair; typedef std::map<void *, PtrBacktracePair> PtrToBacktraceMap; - static lldb_private::Mutex g_mutex(lldb_private::Mutex::eMutexTypeNormal); - lldb_private::Mutex::Locker locker (g_mutex); + static std::mutex g_mutex; + std::lock_guard<std::mutex> guard(g_mutex); static PtrToBacktraceMap g_map; if (sp_this) |