[*] RWLock: another optimization for embedded and win7 targets

This commit is contained in:
Reece Wilson 2023-09-03 13:33:52 +01:00
parent 1479bcaa22
commit 1c80e4910b

View File

@ -690,9 +690,14 @@ namespace Aurora::Threading::Primitives
if (!gUseFutexRWLock)
{
AU_LOCK_GUARD(this->mutex_);
AuAtomicStore(&this->state_, 0);
bElevationPending = AuAtomicLoad(&this->writersPending_) > 0;
if (bElevationPending)
{
this->mutex_.Lock();
this->mutex_.Unlock();
}
}
else
{
@ -733,8 +738,13 @@ namespace Aurora::Threading::Primitives
{
if (!gUseFutexRWLock)
{
AU_LOCK_GUARD(this->mutex_);
bElevationPending = AuAtomicLoad(&this->writersPending_) > 0;
if (bElevationPending)
{
this->mutex_.Lock();
this->mutex_.Unlock();
}
}
else
{