blob: 0b527d38d4f644efee832443021f8780816e2e4f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--- ipc/chromium/src/base/platform_thread_posix.cc~
+++ ipc/chromium/src/base/platform_thread_posix.cc
@@ -11,6 +11,7 @@
#include <mach/mach.h>
#elif defined(OS_LINUX)
#include <sys/syscall.h>
+#include <pthread_np.h>
#include <unistd.h>
#endif
@@ -34,7 +35,13 @@ PlatformThreadId PlatformThread::Current
#if defined(OS_MACOSX)
return mach_thread_self();
#elif defined(OS_LINUX)
- return syscall(__NR_gettid);
+#if __FreeBSD_version > 900030
+ return pthread_getthreadid_np();
+#else
+ long tid;
+ syscall(SYS_thr_self, &tid);
+ return tid;
+#endif
#endif
}
|