Explorar el Código

Disable thread affinity on FreeBSD and Android

tevador hace 6 años
padre
commit
aa19c5b9b6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/tests/affinity.cpp

+ 1 - 1
src/tests/affinity.cpp

@@ -65,7 +65,7 @@ set_thread_affinity(std::thread::native_handle_type thread,
             (thread_policy_t)&policy, 1);
             (thread_policy_t)&policy, 1);
 #elif defined(_WIN32) || defined(__CYGWIN__)
 #elif defined(_WIN32) || defined(__CYGWIN__)
     rc = SetThreadAffinityMask(reinterpret_cast<HANDLE>(thread), 1ULL << cpuid) == 0 ? -2 : 0;
     rc = SetThreadAffinityMask(reinterpret_cast<HANDLE>(thread), 1ULL << cpuid) == 0 ? -2 : 0;
-#elif !defined(__OpenBSD__)
+#elif !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__ANDROID__)
     cpu_set_t cs;
     cpu_set_t cs;
     CPU_ZERO(&cs);
     CPU_ZERO(&cs);
     CPU_SET(cpuid, &cs);
     CPU_SET(cpuid, &cs);