summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-10-10 04:33:41 +0200
committerJan Beich <jbeich@FreeBSD.org>2016-10-28 01:28:29 +0200
commit8ce1ec7ffa6b912dfa776d6923a7af18a7761f67 (patch)
treec01e4f77d180716712cd8fd78e6c855b4f641d32 /src/common
parentcommon: define routines to set thread name on more BSDs (diff)
downloadyuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar.gz
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar.bz2
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar.lz
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar.xz
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.tar.zst
yuzu-8ce1ec7ffa6b912dfa776d6923a7af18a7761f67.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/thread.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/thread.cpp b/src/common/thread.cpp
index a4f5fa336..9bb2f4e1d 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);