mac: Fix a port leak in threading code.

Chromium got the same fix in https://codereview.chromium.org/9169016/ 10 months ago.
Review URL: https://webrtc-codereview.appspot.com/929015

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3080 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
thakis@chromium.org 2012-11-12 18:30:59 +00:00
parent b900721472
commit 6e470076ef

View File

@ -59,10 +59,6 @@
#include <sys/prctl.h>
#endif
#if defined(WEBRTC_MAC)
#include <mach/mach.h>
#endif
#include "system_wrappers/interface/critical_section_wrapper.h"
#include "system_wrappers/interface/event_wrapper.h"
#include "system_wrappers/interface/trace.h"
@ -148,8 +144,6 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
uint32_t ThreadWrapper::GetThreadId() {
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX)
return static_cast<uint32_t>(syscall(__NR_gettid));
#elif defined(WEBRTC_MAC)
return static_cast<uint32_t>(mach_thread_self());
#else
return reinterpret_cast<uint32_t>(pthread_self());
#endif