Date: Fri, 17 Jun 2011 18:06:26 GMT From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r561 - in branches/experimental/www: firefox-aurora/files firefox-beta/files Message-ID: <201106171806.p5HI6QxQ060353@trillian.chruetertee.ch>
next in thread | raw e-mail | index | archive | help
Author: flo Date: Fri Jun 17 18:06:26 2011 New Revision: 561 Log: - use better method to obtain thread ids Submitted by: Pan Tsu <inyaoo@gmail.com> Modified: branches/experimental/www/firefox-aurora/files/patch-ipc-chromium-src-base-platform_thread_posix.cc branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Modified: branches/experimental/www/firefox-aurora/files/patch-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- branches/experimental/www/firefox-aurora/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Thu Jun 16 22:01:09 2011 (r560) +++ branches/experimental/www/firefox-aurora/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Fri Jun 17 18:06:26 2011 (r561) @@ -1,12 +1,25 @@ ---- ipc/chromium/src/base/platform_thread_posix.cc.orig 2011-04-27 09:34:28.000000000 +0200 -+++ ipc/chromium/src/base/platform_thread_posix.cc 2011-04-27 19:47:36.344446266 +0200 -@@ -34,7 +33,8 @@ +--- 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); -+ // TODO(BSD): find a better thread ID -+ return reinterpret_cast<int64>(pthread_self()); ++#if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++#else ++ long tid; ++ syscall(SYS_thr_self, &tid); ++ return tid; ++#endif #endif } Modified: branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Thu Jun 16 22:01:09 2011 (r560) +++ branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Fri Jun 17 18:06:26 2011 (r561) @@ -1,12 +1,25 @@ ---- ipc/chromium/src/base/platform_thread_posix.cc.orig 2011-04-27 09:34:28.000000000 +0200 -+++ ipc/chromium/src/base/platform_thread_posix.cc 2011-04-27 19:47:36.344446266 +0200 -@@ -34,7 +33,8 @@ +--- 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); -+ // TODO(BSD): find a better thread ID -+ return reinterpret_cast<int64>(pthread_self()); ++#if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++#else ++ long tid; ++ syscall(SYS_thr_self, &tid); ++ return tid; ++#endif #endif }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106171806.p5HI6QxQ060353>