|
|
@ -119,10 +119,12 @@ namespace util |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SetThreadName (const char *name) { |
|
|
|
void SetThreadName (const char *name) { |
|
|
|
#if defined (__APPLE__) |
|
|
|
#if defined(__APPLE__) |
|
|
|
pthread_setname_np(name); |
|
|
|
pthread_setname_np(name); |
|
|
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) |
|
|
|
#elif defined(__FreeBSD__) || defined(__OpenBSD__) |
|
|
|
pthread_set_name_np(pthread_self(), name); |
|
|
|
pthread_set_name_np(pthread_self(), name); |
|
|
|
|
|
|
|
#elif defined(__NetBSD__) |
|
|
|
|
|
|
|
pthread_setname_np(pthread_self(), "%s", (void *)name); |
|
|
|
#else |
|
|
|
#else |
|
|
|
pthread_setname_np(pthread_self(), name); |
|
|
|
pthread_setname_np(pthread_self(), name); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|