second pass over removal of Mutex and Condition
llvm-svn: 270024
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index f6c018f..bd8d556 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -575,8 +575,8 @@
}
}
}
- Mutex::Locker options_locker(NULL);
- OptionParser::Prepare(options_locker);
+ std::unique_lock<std::mutex> lock;
+ OptionParser::Prepare(lock);
int val;
while (1)
{
@@ -1218,8 +1218,8 @@
}
}
- Mutex::Locker options_locker(NULL);
- OptionParser::Prepare(options_locker);
+ std::unique_lock<std::mutex> lock;
+ OptionParser::Prepare(lock);
int val;
while (1)
{
@@ -1396,8 +1396,8 @@
}
}
- Mutex::Locker options_locker(NULL);
- OptionParser::Prepare(options_locker);
+ std::unique_lock<std::mutex> lock;
+ OptionParser::Prepare(lock);
OptionParser::EnableError(false);
int val;
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index fed19d7..0a45282 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -276,7 +276,7 @@
{
Target *target = m_exe_ctx.GetTargetPtr();
if (target)
- m_api_locker.Lock (target->GetAPIMutex());
+ m_api_locker = std::unique_lock<std::recursive_mutex>(target->GetAPIMutex());
}
}
@@ -336,7 +336,8 @@
CommandObject::Cleanup ()
{
m_exe_ctx.Clear();
- m_api_locker.Unlock();
+ if (m_api_locker.owns_lock())
+ m_api_locker.unlock();
}
int