[*] Fix WakeOnAddress constness of the comparison argument

This commit is contained in:
Reece Wilson 2023-08-19 19:48:24 +01:00
parent fa34f7dcef
commit 2fae266876
2 changed files with 8 additions and 8 deletions

View File

@ -17,18 +17,18 @@ namespace Aurora::Threading
AuUInt8 uNMaximumThreads);
AUKN_SYM bool TryWaitOnAddress(void *pTargetAddress,
void *pCompareAddress,
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,
void *pCompareAddress,
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,
void *pCompareAddress,
const void *pCompareAddress,
AuUInt8 uWordSize,
AuUInt64 qwNanoseconds);
}

View File

@ -393,7 +393,7 @@ namespace Aurora::Threading
}
bool WaitOnAddressWide(void *pTargetAddress,
void *pCompareAddress,
const void *pCompareAddress,
AuUInt8 uWordSize,
AuOptional<AuUInt64> qwNanoseconds,
AuOptional<AuUInt64> qwNanosecondsAbs,
@ -763,7 +763,7 @@ namespace Aurora::Threading
AuUInt64 qwNanosecondsAbs)
{
auto [pWaitAddress, uDelta, uMask] = DecodeAddress(pTargetAddress, uWordSize);
auto pCompareAddress2 = AuReinterpretCast<char *>(pCompareAddress) - uDelta;
auto pCompareAddress2 = AuReinterpretCast<const char *>(pCompareAddress) - uDelta;
WaitState state;
state.uDownsizeMask = uMask;
@ -785,7 +785,7 @@ namespace Aurora::Threading
}
AUKN_SYM bool WaitOnAddress(void *pTargetAddress,
void *pCompareAddress,
const void *pCompareAddress,
AuUInt8 uWordSize,
AuUInt64 qwNanoseconds)
{
@ -793,7 +793,7 @@ namespace Aurora::Threading
if (bWaitOnAddress)
{
auto [pWaitAddress, uDelta, uMask] = DecodeAddress(pTargetAddress, uWordSize);
auto pCompareAddress2 = AuReinterpretCast<char *>(pCompareAddress) - uDelta;
auto pCompareAddress2 = AuReinterpretCast<const char *>(pCompareAddress) - uDelta;
WaitState state;
state.uDownsizeMask = uMask;
@ -827,7 +827,7 @@ namespace Aurora::Threading
}
AUKN_SYM bool TryWaitOnAddress(void *pTargetAddress,
void *pCompareAddress,
const void *pCompareAddress,
AuUInt8 uWordSize)
{
return Primitives::DoTryIf([=]()