summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBProcess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBProcess.cpp')
-rw-r--r--lldb/source/API/SBProcess.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp
index 9a0b23bc93d..5de36e302c1 100644
--- a/lldb/source/API/SBProcess.cpp
+++ b/lldb/source/API/SBProcess.cpp
@@ -918,9 +918,9 @@ SBProcess::GetThreadByID (tid_t tid)
ProcessSP process_sp(GetSP());
if (process_sp)
{
- Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
Process::StopLocker stop_locker;
const bool can_update = stop_locker.TryLock(&process_sp->GetRunLock());
+ Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
thread_sp = process_sp->GetThreadList().FindThreadByID (tid, can_update);
sb_thread.SetThread (thread_sp);
}
@@ -942,9 +942,9 @@ SBProcess::GetThreadByIndexID (uint32_t index_id)
ProcessSP process_sp(GetSP());
if (process_sp)
{
- Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
Process::StopLocker stop_locker;
const bool can_update = stop_locker.TryLock(&process_sp->GetRunLock());
+ Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
thread_sp = process_sp->GetThreadList().FindThreadByIndexID (index_id, can_update);
sb_thread.SetThread (thread_sp);
}
OpenPOWER on IntegriCloud