summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBCommandInterpreter.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-05-04 23:02:50 +0000
committerJim Ingham <jingham@apple.com>2012-05-04 23:02:50 +0000
commit10ebffa48a592e2e03b2e8478b03ccdd0e8da2d5 (patch)
tree32f9eceb84a66b9b7f0387d5b89ba089d5bb4fe1 /lldb/source/API/SBCommandInterpreter.cpp
parente326ed33a8135dca882a76128840a28c38a1e106 (diff)
downloadbcm5719-llvm-10ebffa48a592e2e03b2e8478b03ccdd0e8da2d5.tar.gz
bcm5719-llvm-10ebffa48a592e2e03b2e8478b03ccdd0e8da2d5.zip
Don't expose the pthread_mutex_t underlying the Mutex & Mutex::Locker classes.
No one was using it and Locker(pthread_mutex_t *) immediately asserts for pthread_mutex_t's that don't come from a Mutex anyway. Rather than try to make that work, we should maintain the Mutex abstraction and not pass around the platform implementation... Make Mutex::Locker::Lock take a Mutex & or a Mutex *, and remove the constructor taking a pthread_mutex_t *. You no longer need to call Mutex::GetMutex to pass your mutex to a Locker (you can't in fact, since I made it private.) llvm-svn: 156221
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 7dd4b2ecf90..515fb2869fd 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.Lock(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex());
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.Lock(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex());
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.Lock(target_sp->GetAPIMutex().GetMutex());
+ api_locker.Lock(target_sp->GetAPIMutex());
m_opaque_ptr->SourceInitFile (true, result.ref());
}
else
OpenPOWER on IntegriCloud