diff options
author | sinetek <pitwuu@gmail.com> | 2015-04-21 02:43:33 +0700 |
---|---|---|
committer | pitwuu@gmail.com <root@lstar.my.domain> | 2015-04-21 03:13:07 +0700 |
commit | cd558b421c3dec7ac491852de5a53475aa6bb38e (patch) | |
tree | dab58f33b49fdf6f597f6807acd8a5aa0d7bf12c /src | |
parent | bc8535b7175ea4b1bff49fe6bef32017cf5f472a (diff) |
FreeBSD, OpenBSD thread renaming.
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 5fef3a40dd..1bb7df7085 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7,6 +7,11 @@ #include "config/bitcoin-config.h" #endif +#if (defined(__FreeBSD__) || defined(__OpenBSD__)) +#include <pthread.h> +#include <pthread_np.h> +#endif + #include "util.h" #include "chainparamsbase.h" @@ -707,10 +712,7 @@ void RenameThread(const char* name) #if defined(PR_SET_NAME) // Only the first 15 characters are used (16 - NUL terminator) ::prctl(PR_SET_NAME, name, 0, 0, 0); -#elif 0 && (defined(__FreeBSD__) || defined(__OpenBSD__)) - // TODO: This is currently disabled because it needs to be verified to work - // on FreeBSD or OpenBSD first. When verified the '0 &&' part can be - // removed. +#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) pthread_set_name_np(pthread_self(), name); #elif defined(MAC_OSX) |