Bug 830908: Thread intsize patch uplifted from webrtc.org r=derf
authorRandell Jesup <rjesup@jesup.org>
Sat, 09 Feb 2013 23:16:10 -0500
changeset 131335 54960ffc951b3af0b516a0e5065e6d7e0219c5a0
parent 131334 3cc609f4744c238c11a5a22166c6df17f92368da
child 131336 8f729db25fa065b0e5fd0ef3752ed16861753a70
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersderf
bugs830908
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 830908: Thread intsize patch uplifted from webrtc.org r=derf
media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
--- a/media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
+++ b/media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
@@ -134,16 +134,18 @@ ThreadPosix::ThreadPosix(ThreadRunFuncti
     strncpy(name_, thread_name, kThreadMaxNameLength);
     name_[kThreadMaxNameLength - 1] = '\0';
   }
 }
 
 uint32_t ThreadWrapper::GetThreadId() {
 #if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX)
   return static_cast<uint32_t>(syscall(__NR_gettid));
+#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+  return pthread_mach_thread_np(pthread_self());
 #else
   return reinterpret_cast<uint32_t>(pthread_self());
 #endif
 }
 
 int ThreadPosix::Construct() {
   int result = 0;
 #if !defined(WEBRTC_ANDROID)