diff options
| author | 2014-08-08 09:58:08 -0400 | |
|---|---|---|
| committer | 2014-08-08 09:58:08 -0400 | |
| commit | 29365e67d621dc732997c5b7a5269fa2dfda09ab (patch) | |
| tree | 583aab4e82aeeb4e687a58510b7c7e447c9fde43 /src/common/thread.cpp | |
| parent | Merge pull request #34 from bunnei/gsp-command-synch (diff) | |
| parent | Use pthread_set_name_np() on OpenBSD. (diff) | |
| download | yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.gz yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.tar.xz yuzu-29365e67d621dc732997c5b7a5269fa2dfda09ab.zip | |
Merge pull request #40 from bentley/master
Use pthread_set_name_np() on OpenBSD.
Diffstat (limited to '')
| -rw-r--r-- | src/common/thread.cpp | 4 |
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 @@ | |||
| 7 | 7 | ||
| 8 | #ifdef __APPLE__ | 8 | #ifdef __APPLE__ |
| 9 | #include <mach/mach.h> | 9 | #include <mach/mach.h> |
| 10 | #elif defined BSD4_4 | 10 | #elif defined(BSD4_4) || defined(__OpenBSD__) |
| 11 | #include <pthread_np.h> | 11 | #include <pthread_np.h> |
| 12 | #endif | 12 | #endif |
| 13 | 13 | ||
| @@ -123,6 +123,8 @@ void SetCurrentThreadName(const char* szThreadName) | |||
| 123 | { | 123 | { |
| 124 | #ifdef __APPLE__ | 124 | #ifdef __APPLE__ |
| 125 | pthread_setname_np(szThreadName); | 125 | pthread_setname_np(szThreadName); |
| 126 | #elif defined(__OpenBSD__) | ||
| 127 | pthread_set_name_np(pthread_self(), szThreadName); | ||
| 126 | #else | 128 | #else |
| 127 | pthread_setname_np(pthread_self(), szThreadName); | 129 | pthread_setname_np(pthread_self(), szThreadName); |
| 128 | #endif | 130 | #endif |