rsx: Remove unnecessary "else" clauses
This commit is contained in:
@@ -23,23 +23,20 @@ namespace rsx
|
|||||||
{
|
{
|
||||||
return ref.try_lock_shared();
|
return ref.try_lock_shared();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return ref.try_lock();
|
return ref.try_lock();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void lock()
|
void lock()
|
||||||
{
|
{
|
||||||
if constexpr (Shared)
|
if constexpr (Shared)
|
||||||
{
|
{
|
||||||
ref.lock_shared();
|
ref.lock_shared();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
ref.lock();
|
ref.lock();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,16 +79,15 @@ namespace rsx
|
|||||||
if (!self || self->id_type() != 0x55u)
|
if (!self || self->id_type() != 0x55u)
|
||||||
{
|
{
|
||||||
mutex_.lock();
|
mutex_.lock();
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
while (!mutex_.try_lock())
|
while (!mutex_.try_lock())
|
||||||
{
|
{
|
||||||
self->cpu_wait({});
|
self->cpu_wait({});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (added_wait)
|
if (added_wait)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user