From ccfd0fafab6669c5ee965008d12ecf2fc1de27e6 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Tue, 22 Aug 2023 11:08:56 +0100 Subject: [PATCH] [*] Why must all languages be garbage at expressing life-span of constness? This is const-correct, as in, we don't expect to modify the pointer; you dont need to be a writer This was const-correct, as in, this field better be a volatile block of memory you expect to update - plz dont to any retarded assumptions based on it being "const," compiler. --- Include/Aurora/Threading/WakeOnAddress.hpp | 6 +++--- Source/Threading/AuWakeOnAddress.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Include/Aurora/Threading/WakeOnAddress.hpp b/Include/Aurora/Threading/WakeOnAddress.hpp index bf59a829..a5ae04c5 100644 --- a/Include/Aurora/Threading/WakeOnAddress.hpp +++ b/Include/Aurora/Threading/WakeOnAddress.hpp @@ -16,18 +16,18 @@ namespace Aurora::Threading AUKN_SYM void WakeNOnAddress(const void *pTargetAddress, AuUInt8 uNMaximumThreads); - AUKN_SYM bool TryWaitOnAddress(void *pTargetAddress, + AUKN_SYM bool TryWaitOnAddress(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize); // Relative timeout variant of nanosecond resolution WoA. nanoseconds in steady clock time. 0 = indefinite - AUKN_SYM bool WaitOnAddress(void *pTargetAddress, + AUKN_SYM bool WaitOnAddress(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize, AuUInt64 qwNanoseconds); // Absolute timeout variant of nanosecond resolution WoA. Nanoseconds are in steady clock time. 0 = indefinite - AUKN_SYM bool WaitOnAddressSteady(void *pTargetAddress, + AUKN_SYM bool WaitOnAddressSteady(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize, AuUInt64 qwNanoseconds); diff --git a/Source/Threading/AuWakeOnAddress.cpp b/Source/Threading/AuWakeOnAddress.cpp index ef7bcfd0..e2328f5b 100644 --- a/Source/Threading/AuWakeOnAddress.cpp +++ b/Source/Threading/AuWakeOnAddress.cpp @@ -391,7 +391,7 @@ namespace Aurora::Threading return kArray; } - bool WaitOnAddressWide(void *pTargetAddress, + bool WaitOnAddressWide(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize, AuOptional qwNanoseconds, @@ -795,7 +795,7 @@ namespace Aurora::Threading } } - AUKN_SYM bool WaitOnAddress(void *pTargetAddress, + AUKN_SYM bool WaitOnAddress(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize, AuUInt64 qwNanoseconds) @@ -837,7 +837,7 @@ namespace Aurora::Threading return false; } - AUKN_SYM bool TryWaitOnAddress(void *pTargetAddress, + AUKN_SYM bool TryWaitOnAddress(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize) { @@ -896,7 +896,7 @@ namespace Aurora::Threading } } - AUKN_SYM bool WaitOnAddressSteady(void *pTargetAddress, + AUKN_SYM bool WaitOnAddressSteady(const void *pTargetAddress, const void *pCompareAddress, AuUInt8 uWordSize, AuUInt64 qwNanoseconds)