diff options
Diffstat (limited to 'lldb/source/API/SBInstruction.cpp')
-rw-r--r-- | lldb/source/API/SBInstruction.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index a17f3f8dbd5..75ff88111cf 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -75,12 +75,13 @@ SBInstruction::GetMnemonic(SBTarget target) { if (m_opaque_sp) { - Mutex::Locker api_locker; ExecutionContext exe_ctx; TargetSP target_sp (target.GetSP()); + std::unique_lock<std::recursive_mutex> lock; if (target_sp) { - api_locker.Lock (target_sp->GetAPIMutex()); + lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex()); + target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } @@ -94,12 +95,13 @@ SBInstruction::GetOperands(SBTarget target) { if (m_opaque_sp) { - Mutex::Locker api_locker; ExecutionContext exe_ctx; TargetSP target_sp (target.GetSP()); + std::unique_lock<std::recursive_mutex> lock; if (target_sp) { - api_locker.Lock (target_sp->GetAPIMutex()); + lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex()); + target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } @@ -113,12 +115,13 @@ SBInstruction::GetComment(SBTarget target) { if (m_opaque_sp) { - Mutex::Locker api_locker; ExecutionContext exe_ctx; TargetSP target_sp (target.GetSP()); + std::unique_lock<std::recursive_mutex> lock; if (target_sp) { - api_locker.Lock (target_sp->GetAPIMutex()); + lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex()); + target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } |