VERY experimental Nintendo Switch 2 emulator
C++
common: only FreeBSD has thread affinity compatible with Linux
Jan Beich90ac6468bb1d
diff --git a/src/common/thread.cpp b/src/common/thread.cppindex a4f5fa336e..9bb2f4e1d8 100644--- a/src/common/thread.cpp+++ b/src/common/thread.cpp@@ -19,6 +19,10 @@#include <unistd.h>#endif+#ifdef __FreeBSD__+#define cpu_set_t cpuset_t+#endif+namespace Common {int CurrentThreadId() {@@ -86,7 +90,7 @@ void SetCurrentThreadName(const char* szThreadName) {void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask) {#ifdef __APPLE__thread_policy_set(pthread_mach_thread_np(thread), THREAD_AFFINITY_POLICY, (integer_t*)&mask, 1);-#elif (defined __linux__ || defined BSD4_4) && !(defined ANDROID)+#elif (defined __linux__ || defined __FreeBSD__) && !(defined ANDROID)cpu_set_t cpu_set;CPU_ZERO(&cpu_set);