diff options
author | Greg Clayton <gclayton@apple.com> | 2012-04-11 00:24:49 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-04-11 00:24:49 +0000 |
commit | 37a0a24a5fdc05e18770661b4ee13a91893dee1a (patch) | |
tree | 52098bf87fb35019b5b41d9af33dd508739a8bfb /lldb/source/API | |
parent | ad66de155bbdb01bc2e0ece769bf150203bd1a63 (diff) | |
download | bcm5719-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')
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 6 | ||||
-rw-r--r-- | lldb/source/API/SBDebugger.cpp | 4 | ||||
-rw-r--r-- | lldb/source/API/SBFunction.cpp | 2 | ||||
-rw-r--r-- | lldb/source/API/SBInstruction.cpp | 6 | ||||
-rw-r--r-- | lldb/source/API/SBSymbol.cpp | 2 |
5 files changed, 10 insertions, 10 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 diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 4c62ffb2c02..b052f77ff6e 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -308,7 +308,7 @@ SBDebugger::HandleCommand (const char *command) TargetSP target_sp (m_opaque_sp->GetSelectedTarget()); Mutex::Locker api_locker; if (target_sp) - api_locker.Reset(target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock(target_sp->GetAPIMutex().GetMutex()); SBCommandInterpreter sb_interpreter(GetCommandInterpreter ()); SBCommandReturnObject result; @@ -830,7 +830,7 @@ SBDebugger::PushInputReader (SBInputReader &reader) TargetSP target_sp (m_opaque_sp->GetSelectedTarget()); Mutex::Locker api_locker; if (target_sp) - api_locker.Reset(target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock(target_sp->GetAPIMutex().GetMutex()); InputReaderSP reader_sp(*reader); m_opaque_sp->PushInputReader (reader_sp); } diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp index d906e6e7af7..4f967b7d51a 100644 --- a/lldb/source/API/SBFunction.cpp +++ b/lldb/source/API/SBFunction.cpp @@ -130,7 +130,7 @@ SBFunction::GetInstructions (SBTarget target) TargetSP target_sp (target.GetSP()); if (target_sp) { - api_locker.Reset (target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock (target_sp->GetAPIMutex().GetMutex()); target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index f384b5b97b4..c5561fd5c90 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -78,7 +78,7 @@ SBInstruction::GetMnemonic(SBTarget target) TargetSP target_sp (target.GetSP()); if (target_sp) { - api_locker.Reset (target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock (target_sp->GetAPIMutex().GetMutex()); target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } @@ -97,7 +97,7 @@ SBInstruction::GetOperands(SBTarget target) TargetSP target_sp (target.GetSP()); if (target_sp) { - api_locker.Reset (target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock (target_sp->GetAPIMutex().GetMutex()); target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } @@ -116,7 +116,7 @@ SBInstruction::GetComment(SBTarget target) TargetSP target_sp (target.GetSP()); if (target_sp) { - api_locker.Reset (target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock (target_sp->GetAPIMutex().GetMutex()); target_sp->CalculateExecutionContext (exe_ctx); exe_ctx.SetProcessSP(target_sp->GetProcessSP()); } diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp index 9b82f368acd..89dff621dc9 100644 --- a/lldb/source/API/SBSymbol.cpp +++ b/lldb/source/API/SBSymbol.cpp @@ -126,7 +126,7 @@ SBSymbol::GetInstructions (SBTarget target) TargetSP target_sp (target.GetSP()); if (target_sp) { - api_locker.Reset (target_sp->GetAPIMutex().GetMutex()); + api_locker.Lock (target_sp->GetAPIMutex().GetMutex()); target_sp->CalculateExecutionContext (exe_ctx); } if (m_opaque_ptr->ValueIsAddress()) |