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

llvm-svn: 122262
This commit is contained in:
Greg Clayton
2010-12-20 20:49:23 +00:00
parent 3307d7cbad
commit af67cecd47
23 changed files with 537 additions and 497 deletions

View File

@@ -125,9 +125,11 @@ SBFunction::GetInstructions (SBTarget target)
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();
}