summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBCommandInterpreter.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-04-11 00:24:49 +0000
committerGreg Clayton <gclayton@apple.com>2012-04-11 00:24:49 +0000
commit37a0a24a5fdc05e18770661b4ee13a91893dee1a (patch)
tree52098bf87fb35019b5b41d9af33dd508739a8bfb /lldb/source/API/SBCommandInterpreter.cpp
parentad66de155bbdb01bc2e0ece769bf150203bd1a63 (diff)
downloadbcm5719-llvm-37a0a24a5fdc05e18770661b4ee13a91893dee1a.tar.gz
bcm5719-llvm-37a0a24a5fdc05e18770661b4ee13a91893dee1a.zip
No functionality changes, mostly cleanup.
Cleaned up the Mutex::Locker and the ReadWriteLock classes a bit. Also cleaned up the GDBRemoteCommunication class to not have so many packet functions. Used the "NoLock" versions of send/receive packet functions when possible for a bit of performance. llvm-svn: 154458
Diffstat (limited to 'lldb/source/API/SBCommandInterpreter.cpp')
-rw-r--r--lldb/source/API/SBCommandInterpreter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp
index 4593a594330..7dd4b2ecf90 100644
--- a/lldb/source/API/SBCommandInterpreter.cpp
+++ b/lldb/source/API/SBCommandInterpreter.cpp
@@ -93,7 +93,7 @@ SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnOb
TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
Mutex::Locker api_locker;
if (target_sp)
- api_locker.Reset(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
m_opaque_ptr->HandleCommand (command_line, add_to_history, result.ref());
}
else
@@ -238,7 +238,7 @@ SBCommandInterpreter::SourceInitFileInHomeDirectory (SBCommandReturnObject &resu
TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
Mutex::Locker api_locker;
if (target_sp)
- api_locker.Reset(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
m_opaque_ptr->SourceInitFile (false, result.ref());
}
else
@@ -263,7 +263,7 @@ SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory (SBCommandReturnOb
TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget());
Mutex::Locker api_locker;
if (target_sp)
- api_locker.Reset(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex().GetMutex());
m_opaque_ptr->SourceInitFile (true, result.ref());
}
else
OpenPOWER on IntegriCloud