Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: webrtc/system_wrappers/source/event_timer_posix.cc

Issue 1469013002: Move ThreadWrapper to ProcessThread in base. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removed comment Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 created_at_.tv_sec = 0; 147 created_at_.tv_sec = 0;
148 timer_event_->Set(); 148 timer_event_->Set();
149 pthread_mutex_unlock(&mutex_); 149 pthread_mutex_unlock(&mutex_);
150 return true; 150 return true;
151 } 151 }
152 } 152 }
153 153
154 // Start the timer thread 154 // Start the timer thread
155 timer_event_.reset(new EventTimerPosix()); 155 timer_event_.reset(new EventTimerPosix());
156 const char* thread_name = "WebRtc_event_timer_thread"; 156 const char* thread_name = "WebRtc_event_timer_thread";
157 timer_thread_ = ThreadWrapper::CreateThread(Run, this, thread_name); 157 timer_thread_ = PlatformThread::CreateThread(Run, this, thread_name);
158 periodic_ = periodic; 158 periodic_ = periodic;
159 time_ = time; 159 time_ = time;
160 bool started = timer_thread_->Start(); 160 bool started = timer_thread_->Start();
161 timer_thread_->SetPriority(kRealtimePriority); 161 timer_thread_->SetPriority(kRealtimePriority);
162 pthread_mutex_unlock(&mutex_); 162 pthread_mutex_unlock(&mutex_);
163 163
164 return started; 164 return started;
165 } 165 }
166 166
167 bool EventTimerPosix::Run(void* obj) { 167 bool EventTimerPosix::Run(void* obj) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 timer_event_.reset(); 223 timer_event_.reset();
224 224
225 // Set time to zero to force new reference time for the timer. 225 // Set time to zero to force new reference time for the timer.
226 memset(&created_at_, 0, sizeof(created_at_)); 226 memset(&created_at_, 0, sizeof(created_at_));
227 count_ = 0; 227 count_ = 0;
228 return true; 228 return true;
229 } 229 }
230 230
231 } // namespace webrtc 231 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/event_timer_posix.h ('k') | webrtc/system_wrappers/source/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698