[*] Don't warn on XP/Vista
This commit is contained in:
parent
921fee1b8d
commit
9c04b31da3
@ -1032,7 +1032,22 @@ namespace Aurora::Threading::Threads
|
||||
}
|
||||
}
|
||||
|
||||
SetThreadAffinityMask(this->handle_, mask.lower);
|
||||
if (mask.CpuBitCount() <= 32)
|
||||
{
|
||||
DWORD_PTR uProcMask {};
|
||||
DWORD_PTR uSysMask {};
|
||||
AuUInt32 uProcmask { mask.lower };
|
||||
|
||||
if (::GetProcessAffinityMask(GetCurrentProcess(), &uProcMask, &uSysMask))
|
||||
{
|
||||
uProcmask &= uProcMask;
|
||||
}
|
||||
|
||||
if (::SetThreadAffinityMask(this->handle_, uProcmask))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
SysPushErrorUnavailableError("Couldn't set thread affinity");
|
||||
|
Loading…
Reference in New Issue
Block a user