The LLDB API (lldb::SB*) is now thread safe!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122262 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFunction.cpp b/source/API/SBFunction.cpp
index 54081b5..853a6ff 100644
--- a/source/API/SBFunction.cpp
+++ b/source/API/SBFunction.cpp
@@ -125,9 +125,11 @@
     SBInstructionList sb_instructions;
     if (m_opaque_ptr)
     {
+        Mutex::Locker api_locker;
         ExecutionContext exe_ctx;
         if (target.IsValid())
         {
+            api_locker.Reset (target->GetAPIMutex().GetMutex());
             target->CalculateExecutionContext (exe_ctx);
             exe_ctx.process = target->GetProcessSP().get();
         }