blob: b9f49fea019d0f3a6b92fdc23ae8180fee90c6c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.3 2013/09/19 12:37:49 ryoon Exp $
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2013-09-10 03:43:34.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
@@ -10,7 +10,9 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
#elif defined(OS_NETBSD)
+_Pragma("GCC visibility push(default)")
#include <lwp.h>
+_Pragma("GCC visibility pop")
#elif defined(OS_LINUX)
#include <sys/syscall.h>
#include <sys/prctl.h>
@@ -110,7 +112,8 @@ void PlatformThread::SetName(const char*
pthread_setname_np(pthread_self(), "%s", (void *)name);
#elif defined(OS_BSD) && !defined(__GLIBC__)
pthread_set_name_np(pthread_self(), name);
-#else
+#elif !defined(OS_SOLARIS)
+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
#endif
}
#endif // !OS_MACOSX
|