diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index e744b58..f1d3eb3 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -792,14 +792,17 @@ protected: } } - const uint32_t num_threads = process->GetThreadList().GetSize(); + { // Scope for thread list mutex: + Mutex::Locker locker (process->GetThreadList().GetMutex()); + const uint32_t num_threads = process->GetThreadList().GetSize(); - // Set the actions that the threads should each take when resuming - for (uint32_t idx=0; idx<num_threads; ++idx) - { - process->GetThreadList().GetThreadAtIndex(idx)->SetResumeState (eStateRunning); + // Set the actions that the threads should each take when resuming + for (uint32_t idx=0; idx<num_threads; ++idx) + { + process->GetThreadList().GetThreadAtIndex(idx)->SetResumeState (eStateRunning); + } } - + Error error(process->Resume()); if (error.Success()) { |
