Mac 64-bit compatibility for WebRTC.

pthread_t is a pointer type on Mac OS X, and is thus 32 bits wide in the
32-bit environment and 64 bits wide in the 64-bit environment. WebRTC's
thread ID routines assume that thread IDs can always fit inside a uint32_t,
but this is not the case in the 64-bit Mac environment when using pthread_t
as the basis for a thread ID. Instead, switch to using the underlying Mach
port for the thread, which is a 32-bit quantity in both the 32-bit and 64-bit
environments.

The only place this seems to be used is in TraceImpl::AddThreadId, and it's
only used there for a thread ID for display.

This is a better fix than https://webrtc-codereview.appspot.com/929015 .
Review URL: https://webrtc-codereview.appspot.com/1063005

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3427 4adac7df-926f-26a2-2b94-8c16560cd09d
1 file changed