Bugfix mac pid_t
Review URL: http://webrtc-codereview.appspot.com/350004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1384 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b54d72778c
commit
df9866fedb
@ -64,9 +64,11 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
|
||||
_dead(true),
|
||||
_prio(prio),
|
||||
_event(EventWrapper::Create()),
|
||||
_setThreadName(false),
|
||||
_pid(-1)
|
||||
_setThreadName(false)
|
||||
{
|
||||
#if (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID))
|
||||
_pid = -1;
|
||||
#endif
|
||||
if (threadName != NULL)
|
||||
{
|
||||
_setThreadName = true;
|
||||
@ -279,7 +281,9 @@ void ThreadPosix::Run()
|
||||
{
|
||||
_alive = true;
|
||||
_dead = false;
|
||||
#if (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID))
|
||||
_pid = GetThreadId();
|
||||
#endif
|
||||
// The event the Start() is waiting for.
|
||||
_event->Set();
|
||||
|
||||
|
@ -59,7 +59,9 @@ private:
|
||||
// handle to thread
|
||||
pthread_attr_t _attr;
|
||||
pthread_t _thread;
|
||||
#if (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID))
|
||||
pid_t _pid;
|
||||
#endif
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user