[*] another preemptive linux fix. i missed a step in calculating the mask (i didnt calculate the mask at all)

This commit is contained in:
Reece Wilson 2023-04-16 23:58:27 +01:00
parent 53a29a6c13
commit 0c494cb99a

View File

@ -436,14 +436,22 @@ namespace Aurora::Threading
}
AuTuple<const void *, AuUInt8, AuOptionalEx<AuUInt32>> DecodeAddress(const void *pAddress,
AuUInt32 uSizeMask)
AuUInt32 uWordSize)
{
#if defined(AURORA_IS_MODERNNT_DERIVED)
return AuMakeTuple(pAddress, 0, AuOptionalEx<AuUInt32> {});
#endif
if (uWordSize == 8)
{
return AuMakeTuple(pAddress, 0xFFFFFFFF, 0xFFFFFFFF);
}
auto pRounded = AuPageRound(AuUInt(pAddress), AuUInt(4));
auto uDelta = (AuUInt)(pAddress) - (AuUInt)(pRounded);
AuUInt32 uSizeMask = std::pow(AuUInt64(2), AuUInt64(uWordSize * 8)) - 1ull;
switch (uDelta)
{
case 0: