summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandObject.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-02-07 22:31:20 +0000
committerGreg Clayton <gclayton@apple.com>2014-02-07 22:31:20 +0000
commit9b5442aed9858419dd12f622d763d7a92a92020f (patch)
tree4e28065ddc02cbee6c29930929e0595400584bfc /lldb/source/Interpreter/CommandObject.cpp
parent41c440fbfea9112d4e8a9dfd8c851fe39a04525d (diff)
downloadbcm5719-llvm-9b5442aed9858419dd12f622d763d7a92a92020f.tar.gz
bcm5719-llvm-9b5442aed9858419dd12f622d763d7a92a92020f.zip
Now that the command interpreter runs in a separate thread in Xcode, we need to lock the target API lock instead of trying to lock it.
What was happening was: 1 - Xcode ran and stopped and was doing work on thread 2 2 - Users would type something in Xcode console on thread 1 3 - thread 3 would be running command interpreter thread and try to execute command but get "failed to get API lock" error for any command that wanted the target API lock (like "expression") <rdar://problem/15775016> llvm-svn: 200997
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index c71ca28b033..c6995366c87 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -261,13 +261,7 @@ CommandObject::CheckRequirements (CommandReturnObject &result)
{
Target *target = m_exe_ctx.GetTargetPtr();
if (target)
- {
- if (m_api_locker.TryLock (target->GetAPIMutex(), NULL) == false)
- {
- result.AppendError ("failed to get API lock");
- return false;
- }
- }
+ m_api_locker.Lock (target->GetAPIMutex());
}
}
OpenPOWER on IntegriCloud