diff options
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r-- | lldb/source/API/SBDebugger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index a1d19d44bad..3493ad507a7 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -411,9 +411,9 @@ SBDebugger::HandleCommand (const char *command) if (m_opaque_sp) { TargetSP target_sp (m_opaque_sp->GetSelectedTarget()); - Mutex::Locker api_locker; + 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()); SBCommandInterpreter sb_interpreter(GetCommandInterpreter ()); SBCommandReturnObject result; @@ -474,8 +474,8 @@ SBDebugger::HandleProcessEvent (const SBProcess &process, const SBEvent &event, char stdio_buffer[1024]; size_t len; - Mutex::Locker api_locker (target_sp->GetAPIMutex()); - + std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex()); + if (event_type & (Process::eBroadcastBitSTDOUT | Process::eBroadcastBitStateChanged)) { // Drain stdout when we stop just in case we have any bytes |