Browse Source

Merge pull request #6033

cd558b4 FreeBSD, OpenBSD thread renaming. (sinetek)
tags/v0.15.1
Wladimir J. van der Laan 5 years ago
parent
commit
1623f6e337
No account linked to committer's email address
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      src/util.cpp

+ 6
- 4
src/util.cpp View File

@@ -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)

Loading…
Cancel
Save