1
0
mirror of synced 2026-01-28 20:20:43 +00:00

Fixes for mingw and cygwin builds.

This commit is contained in:
Andras Tantos
2023-01-31 16:46:20 -08:00
parent f323876d02
commit fae57fcf12
4 changed files with 23 additions and 11 deletions

View File

@@ -45,7 +45,7 @@ void SetThreadAffinity(std::thread &aThread, size_t aCpuId) {
CRAY_ASSERT(aCpuId < std::thread::hardware_concurrency());
CRAY_ASSERT(aCpuId < (sizeof(DWORD_PTR) *8));
DWORD_PTR CpuMask = DWORD_PTR(1) << aCpuId;
DWORD_PTR RetVal = SetThreadAffinityMask(aThread.native_handle(), CpuMask);
DWORD_PTR RetVal = SetThreadAffinityMask((HANDLE)aThread.native_handle(), CpuMask);
if (RetVal == 0) throw Generic_x() << "Error calling SetThreadAffinityMask: " << HexPrinter(GetLastError());
}