From bb19a13c0b3fe1ecdc1e46bbf2b06ffc1e25e04e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 19 May 2016 05:13:57 +0000 Subject: second pass over removal of Mutex and Condition llvm-svn: 270024 --- lldb/source/API/SBDebugger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/API/SBDebugger.cpp') 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 lock; if (target_sp) - api_locker.Lock(target_sp->GetAPIMutex()); + lock = std::unique_lock(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 guard(target_sp->GetAPIMutex()); + if (event_type & (Process::eBroadcastBitSTDOUT | Process::eBroadcastBitStateChanged)) { // Drain stdout when we stop just in case we have any bytes -- cgit v1.2.3