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:
parent
b900721472
commit
6e470076ef
@ -59,10 +59,6 @@
|
|||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WEBRTC_MAC)
|
|
||||||
#include <mach/mach.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "system_wrappers/interface/critical_section_wrapper.h"
|
#include "system_wrappers/interface/critical_section_wrapper.h"
|
||||||
#include "system_wrappers/interface/event_wrapper.h"
|
#include "system_wrappers/interface/event_wrapper.h"
|
||||||
#include "system_wrappers/interface/trace.h"
|
#include "system_wrappers/interface/trace.h"
|
||||||
@ -148,8 +144,6 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
|
|||||||
uint32_t ThreadWrapper::GetThreadId() {
|
uint32_t ThreadWrapper::GetThreadId() {
|
||||||
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX)
|
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX)
|
||||||
return static_cast<uint32_t>(syscall(__NR_gettid));
|
return static_cast<uint32_t>(syscall(__NR_gettid));
|
||||||
#elif defined(WEBRTC_MAC)
|
|
||||||
return static_cast<uint32_t>(mach_thread_self());
|
|
||||||
#else
|
#else
|
||||||
return reinterpret_cast<uint32_t>(pthread_self());
|
return reinterpret_cast<uint32_t>(pthread_self());
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user