OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 { | 69 { |
70 // TODO(tommi): Since DeRegisterModule is currently being called from | 70 // TODO(tommi): Since DeRegisterModule is currently being called from |
71 // different threads in some cases (ChannelOwner), we need to lock access to | 71 // different threads in some cases (ChannelOwner), we need to lock access to |
72 // the modules_ collection even on the controller thread. | 72 // the modules_ collection even on the controller thread. |
73 // Once we've cleaned up those places, we can remove this lock. | 73 // Once we've cleaned up those places, we can remove this lock. |
74 rtc::CritScope lock(&lock_); | 74 rtc::CritScope lock(&lock_); |
75 for (ModuleCallback& m : modules_) | 75 for (ModuleCallback& m : modules_) |
76 m.module->ProcessThreadAttached(this); | 76 m.module->ProcessThreadAttached(this); |
77 } | 77 } |
78 | 78 |
79 thread_ = ThreadWrapper::CreateThread(&ProcessThreadImpl::Run, this, | 79 thread_ = |
80 thread_name_); | 80 PlatformThread::CreateThread(&ProcessThreadImpl::Run, this, thread_name_); |
81 RTC_CHECK(thread_->Start()); | 81 RTC_CHECK(thread_->Start()); |
82 } | 82 } |
83 | 83 |
84 void ProcessThreadImpl::Stop() { | 84 void ProcessThreadImpl::Stop() { |
85 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 85 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
86 if(!thread_.get()) | 86 if(!thread_.get()) |
87 return; | 87 return; |
88 | 88 |
89 { | 89 { |
90 rtc::CritScope lock(&lock_); | 90 rtc::CritScope lock(&lock_); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
231 int64_t time_to_wait = next_checkpoint - TickTime::MillisecondTimestamp(); | 231 int64_t time_to_wait = next_checkpoint - TickTime::MillisecondTimestamp(); |
232 if (time_to_wait > 0) | 232 if (time_to_wait > 0) |
233 wake_up_->Wait(static_cast<unsigned long>(time_to_wait)); | 233 wake_up_->Wait(static_cast<unsigned long>(time_to_wait)); |
234 | 234 |
235 return true; | 235 return true; |
236 } | 236 } |
237 } // namespace webrtc | 237 } // namespace webrtc |
OLD | NEW |