second pass over removal of Mutex and Condition

llvm-svn: 270024
This commit is contained in:
Saleem Abdulrasool
2016-05-19 05:13:57 +00:00
parent fe12d0e3e5
commit bb19a13c0b
84 changed files with 995 additions and 1046 deletions

View File

@@ -127,7 +127,7 @@ public:
}
lldb::ValueObjectSP
GetSP (Process::StopLocker &stop_locker, Mutex::Locker &api_locker, Error &error)
GetSP(Process::StopLocker &stop_locker, std::unique_lock<std::recursive_mutex> &lock, Error &error)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (!m_valobj_sp)
@@ -139,11 +139,11 @@ public:
lldb::ValueObjectSP value_sp = m_valobj_sp;
Target *target = value_sp->GetTargetSP().get();
if (target)
api_locker.Lock(target->GetAPIMutex());
else
if (!target)
return ValueObjectSP();
lock = std::unique_lock<std::recursive_mutex>(target->GetAPIMutex());
ProcessSP process_sp(value_sp->GetProcessSP());
if (process_sp && !stop_locker.TryLock (&process_sp->GetRunLock()))
{
@@ -255,13 +255,13 @@ public:
ValueLocker ()
{
}
ValueObjectSP
GetLockedSP(ValueImpl &in_value)
{
return in_value.GetSP(m_stop_locker, m_api_locker, m_lock_error);
return in_value.GetSP(m_stop_locker, m_lock, m_lock_error);
}
Error &
GetError()
{
@@ -270,9 +270,8 @@ public:
private:
Process::StopLocker m_stop_locker;
Mutex::Locker m_api_locker;
std::unique_lock<std::recursive_mutex> m_lock;
Error m_lock_error;
};
SBValue::SBValue () :