fix clang

This commit is contained in:
Fire Cube 2025-05-07 22:18:02 +02:00
parent 1057e5beef
commit 9f4e2e82c1

View File

@ -541,14 +541,16 @@ int Pthread::SetAffinity(const Cpuset* cpuset) {
return POSIX_ESRCH; return POSIX_ESRCH;
} }
/* We don't use this currently because some games gets performance problems when applying affinity even on strong hardware // We don't use this currently because some games gets performance problems
#ifdef _WIN64 // when applying affinity event
/*
#ifdef _WIN64
DWORD_PTR affinity_mask = static_cast<DWORD_PTR>(mask); DWORD_PTR affinity_mask = static_cast<DWORD_PTR>(mask);
if (!SetThreadAffinityMask(reinterpret_cast<HANDLE>(handle), affinity_mask)) { if (!SetThreadAffinityMask(reinterpret_cast<HANDLE>(handle), affinity_mask)) {
return POSIX_EINVAL; return POSIX_EINVAL;
} }
#elif defined(__linux__) #elif defined(__linux__)
cpu_set_t cpu_set; cpu_set_t cpu_set;
CPU_ZERO(&cpu_set); CPU_ZERO(&cpu_set);
@ -564,8 +566,8 @@ int Pthread::SetAffinity(const Cpuset* cpuset) {
if (result != 0) { if (result != 0) {
return POSIX_EINVAL; return POSIX_EINVAL;
} }
#endif #endif
*/ */
return 0; return 0;
} }