From 1fa063e19f8ca3d1a1fe8e0a8fecf747c0be1471 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sat, 9 Sep 2023 15:11:33 +0100 Subject: [PATCH] [*] Why am i calling libm/crt from here? how stupid am i --- Source/Threading/AuWakeOnAddress.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Threading/AuWakeOnAddress.cpp b/Source/Threading/AuWakeOnAddress.cpp index ea49d851..b44516ba 100644 --- a/Source/Threading/AuWakeOnAddress.cpp +++ b/Source/Threading/AuWakeOnAddress.cpp @@ -432,15 +432,15 @@ namespace Aurora::Threading return AuMakeTuple(pAddress, 0, AuOptionalEx {}); #endif + auto pRounded = AuPageRound(AuUInt(pAddress), AuUInt(4)); + auto uDelta = (AuUInt)pAddress - pRounded; + if (uWordSize == 8) { - return AuMakeTuple(pAddress, 0xFFFFFFFF, 0xFFFFFFFF); + return AuMakeTuple((const void *)pRounded, uDelta, 0xFFFFFFFF); } - auto pRounded = AuPageRound(AuUInt(pAddress), AuUInt(4)); - auto uDelta = (AuUInt)(pAddress) - (AuUInt)(pRounded); - - AuUInt32 uSizeMask = std::pow(AuUInt64(2), AuUInt64(uWordSize * 8)) - 1ull; + AuUInt32 uSizeMask = (1ull << (uWordSize * 8)) - 1ull; switch (uDelta) {