From 1a4a4ad8633ff532f5c0a5f655983b8d17358153 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 9 Sep 2023 19:46:08 +0100 Subject: [PATCH] [*] Added missing `this->`s --- .../Primitives/AuConditionMutex.NT.cpp | 6 +++--- Source/Threading/Primitives/AuMutex.Linux.cpp | 4 ++-- Source/Threading/Primitives/AuMutex.NT.cpp | 4 ++-- Source/Threading/Primitives/AuRWLock.cpp | 8 ++++---- .../Threading/Primitives/AuSemaphore.Linux.cpp | 4 ++-- Source/Threading/Primitives/AuSemaphore.NT.cpp | 18 +++++++++--------- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Source/Threading/Primitives/AuConditionMutex.NT.cpp b/Source/Threading/Primitives/AuConditionMutex.NT.cpp index 839d301c..9b504da7 100644 --- a/Source/Threading/Primitives/AuConditionMutex.NT.cpp +++ b/Source/Threading/Primitives/AuConditionMutex.NT.cpp @@ -35,11 +35,11 @@ namespace Aurora::Threading::Primitives #else if (ThrdCfg::gPreferNtCondMutexSpinTryLock) { - return TryLockHeavy(); + return this->TryLockHeavy(); } else { - return TryLockNoSpin(); + return this->TryLockNoSpin(); } #endif } @@ -48,7 +48,7 @@ namespace Aurora::Threading::Primitives { return DoTryIf([=]() { - return TryLockNoSpin(); + return this->TryLockNoSpin(); }); } diff --git a/Source/Threading/Primitives/AuMutex.Linux.cpp b/Source/Threading/Primitives/AuMutex.Linux.cpp index 2f6fe721..53af0c33 100755 --- a/Source/Threading/Primitives/AuMutex.Linux.cpp +++ b/Source/Threading/Primitives/AuMutex.Linux.cpp @@ -58,13 +58,13 @@ namespace Aurora::Threading::Primitives { return DoTryIf([=]() { - return TryLockNoSpin(); + return this->TryLockNoSpin(); }); } bool MutexImpl::LockMS(AuUInt64 uTimeout) { - return LockNS(AuMSToNS(uTimeout)); + return this->LockNS(AuMSToNS(uTimeout)); } bool MutexImpl::LockNS(AuUInt64 uTimeout) diff --git a/Source/Threading/Primitives/AuMutex.NT.cpp b/Source/Threading/Primitives/AuMutex.NT.cpp index 382d74bd..670db5cb 100644 --- a/Source/Threading/Primitives/AuMutex.NT.cpp +++ b/Source/Threading/Primitives/AuMutex.NT.cpp @@ -56,11 +56,11 @@ namespace Aurora::Threading::Primitives { if (ThrdCfg::gPreferNtMutexSpinTryLock) { - return TryLockHeavy(); + return this->TryLockHeavy(); } else { - return TryLockNoSpin(); + return this->TryLockNoSpin(); } } diff --git a/Source/Threading/Primitives/AuRWLock.cpp b/Source/Threading/Primitives/AuRWLock.cpp index e22a4260..88e94c44 100644 --- a/Source/Threading/Primitives/AuRWLock.cpp +++ b/Source/Threading/Primitives/AuRWLock.cpp @@ -282,7 +282,7 @@ namespace Aurora::Threading::Primitives if constexpr (!bIsWriteRecursionAllowed) { - if (TryLockWrite()) + if (this->TryLockWrite()) { return true; } @@ -356,7 +356,7 @@ namespace Aurora::Threading::Primitives { if constexpr (!bIsWriteRecursionAllowed) { - if (TryLockWrite()) + if (this->TryLockWrite()) { return true; } @@ -564,12 +564,12 @@ namespace Aurora::Threading::Primitives { return DoTryIf([=]() { - return TryLockReadNoSpin(); + return this->TryLockReadNoSpin(); }); } else { - return TryLockReadNoSpin(); + return this->TryLockReadNoSpin(); } } diff --git a/Source/Threading/Primitives/AuSemaphore.Linux.cpp b/Source/Threading/Primitives/AuSemaphore.Linux.cpp index b415f7eb..dac66420 100644 --- a/Source/Threading/Primitives/AuSemaphore.Linux.cpp +++ b/Source/Threading/Primitives/AuSemaphore.Linux.cpp @@ -54,13 +54,13 @@ namespace Aurora::Threading::Primitives { return DoTryIf([=]() { - return TryLockNoSpin(); + return this->TryLockNoSpin(); }); } bool SemaphoreImpl::LockMS(AuUInt64 uTimeout) { - return LockNS(AuMSToNS(uTimeout)); + return this->LockNS(AuMSToNS(uTimeout)); } bool SemaphoreImpl::LockNS(AuUInt64 uTimeout) diff --git a/Source/Threading/Primitives/AuSemaphore.NT.cpp b/Source/Threading/Primitives/AuSemaphore.NT.cpp index f7eb2548..1634664a 100644 --- a/Source/Threading/Primitives/AuSemaphore.NT.cpp +++ b/Source/Threading/Primitives/AuSemaphore.NT.cpp @@ -53,7 +53,7 @@ namespace Aurora::Threading::Primitives { return DoTryIf([=]() { - return TryLockNoSpin(); + return this->TryLockNoSpin(); }); } @@ -61,11 +61,11 @@ namespace Aurora::Threading::Primitives { if (ThrdCfg::gPreferNtSemaphoreSpinTryLock) { - return TryLockHeavy(); + return this->TryLockHeavy(); } else { - return TryLockNoSpin(); + return this->TryLockNoSpin(); } } @@ -76,7 +76,7 @@ namespace Aurora::Threading::Primitives bool SemaphoreImpl::LockMS(AuUInt64 uTimeout) { - return LockNS(AuMSToNS(uTimeout)); + return this->LockNS(AuMSToNS(uTimeout)); } bool SemaphoreImpl::LockNS(AuUInt64 uTimeout) @@ -106,7 +106,7 @@ namespace Aurora::Threading::Primitives { static const AuUInt32 kExpect { 0 }; - auto pCounter = GetSleepCounter(); + auto pCounter = this->GetSleepCounter(); AuAtomicAdd(pCounter, 1u); bool bStatus = InternalLTSWaitOnAddressHighRes(&this->dwState_, &kExpect, sizeof(kExpect), uEnd); AuAtomicSub(pCounter, 1u); @@ -123,7 +123,7 @@ namespace Aurora::Threading::Primitives { this->mutex.Lock(); - while (!TryLockNoSpin()) + while (!this->TryLockNoSpin()) { if (uTimeout != 0) { @@ -163,7 +163,7 @@ namespace Aurora::Threading::Primitives { static const AuUInt32 kExpect { 0 }; - auto pCounter = GetSleepCounter(); + auto pCounter = this->GetSleepCounter(); AuAtomicAdd(pCounter, 1u); bool bStatus = InternalLTSWaitOnAddressHighRes(&this->dwState_, &kExpect, sizeof(kExpect), qwTimeoutAbs); AuAtomicSub(pCounter, 1u); @@ -180,7 +180,7 @@ namespace Aurora::Threading::Primitives { this->mutex.Lock(); - while (!TryLockNoSpin()) + while (!this->TryLockNoSpin()) { if (qwTimeoutAbs != 0) { @@ -217,7 +217,7 @@ namespace Aurora::Threading::Primitives { AuAtomicAdd(&this->dwState_, count); - if (AuAtomicLoad(GetSleepCounter())) + if (AuAtomicLoad(this->GetSleepCounter())) { if (count == 1) {