mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 20:54:40 +08:00
second pass over removal of Mutex and Condition
llvm-svn: 270024
This commit is contained in:
@@ -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 () :
|
||||
|
||||
Reference in New Issue
Block a user