[*] RWLock: another optimization for embedded and win7 targets
This commit is contained in:
parent
1479bcaa22
commit
1c80e4910b
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user