summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-08-08 15:58:08 +0200
committerbunnei <bunneidev@gmail.com>2014-08-08 15:58:08 +0200
commit29365e67d621dc732997c5b7a5269fa2dfda09ab (patch)
tree583aab4e82aeeb4e687a58510b7c7e447c9fde43 /src
parentMerge pull request #34 from bunnei/gsp-command-synch (diff)
parentUse pthread_set_name_np() on OpenBSD. (diff)
downloadyuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.gz
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.bz2
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.lz
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.xz
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.zst
yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.zip
Diffstat (limited to '')
-rw-r--r--src/common/thread.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/thread.cpp b/src/common/thread.cpp
index c70ee37cf..7341035c2 100644
--- a/src/common/thread.cpp
+++ b/src/common/thread.cpp
@@ -7,7 +7,7 @@
#ifdef __APPLE__
#include <mach/mach.h>
-#elif defined BSD4_4
+#elif defined(BSD4_4) || defined(__OpenBSD__)
#include <pthread_np.h>
#endif
@@ -123,6 +123,8 @@ void SetCurrentThreadName(const char* szThreadName)
{
#ifdef __APPLE__
pthread_setname_np(szThreadName);
+#elif defined(__OpenBSD__)
+ pthread_set_name_np(pthread_self(), szThreadName);
#else
pthread_setname_np(pthread_self(), szThreadName);
#endif