Author: gclayton
Date: Fri Feb  7 16:31:20 2014
New Revision: 200997

URL: http://llvm.org/viewvc/llvm-project?rev=200997&view=rev
Log:
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>

Modified:
    lldb/trunk/source/Interpreter/CommandObject.cpp

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=200997&r1=200996&r2=200997&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Fri Feb  7 16:31:20 2014
@@ -261,13 +261,7 @@ CommandObject::CheckRequirements (Comman
         {
             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());
         }
     }
 


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to