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

Side by Side Diff: runtime/vm/thread_pool.cc

Issue 796063006: Rename Thread -> OSThread. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/thread_pool.h ('k') | runtime/vm/thread_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/thread_pool.h" 5 #include "vm/thread_pool.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/lockers.h" 8 #include "vm/lockers.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 225
226 void ThreadPool::Worker::StartThread() { 226 void ThreadPool::Worker::StartThread() {
227 #if defined(DEBUG) 227 #if defined(DEBUG)
228 // Must call SetTask before StartThread. 228 // Must call SetTask before StartThread.
229 { // NOLINT 229 { // NOLINT
230 MonitorLocker ml(&monitor_); 230 MonitorLocker ml(&monitor_);
231 ASSERT(task_ != NULL); 231 ASSERT(task_ != NULL);
232 } 232 }
233 #endif 233 #endif
234 int result = Thread::Start(&Worker::Main, reinterpret_cast<uword>(this)); 234 int result = OSThread::Start(&Worker::Main, reinterpret_cast<uword>(this));
235 if (result != 0) { 235 if (result != 0) {
236 FATAL1("Could not start worker thread: result = %d.", result); 236 FATAL1("Could not start worker thread: result = %d.", result);
237 } 237 }
238 } 238 }
239 239
240 240
241 void ThreadPool::Worker::SetTask(Task* task) { 241 void ThreadPool::Worker::SetTask(Task* task) {
242 MonitorLocker ml(&monitor_); 242 MonitorLocker ml(&monitor_);
243 ASSERT(task_ == NULL); 243 ASSERT(task_ == NULL);
244 task_ = task; 244 task_ = task;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // The exit monitor is only used during testing. 325 // The exit monitor is only used during testing.
326 if (ThreadPool::exit_monitor_) { 326 if (ThreadPool::exit_monitor_) {
327 MonitorLocker ml(ThreadPool::exit_monitor_); 327 MonitorLocker ml(ThreadPool::exit_monitor_);
328 (*ThreadPool::exit_count_)++; 328 (*ThreadPool::exit_count_)++;
329 ml.Notify(); 329 ml.Notify();
330 } 330 }
331 delete worker; 331 delete worker;
332 } 332 }
333 333
334 } // namespace dart 334 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread_pool.h ('k') | runtime/vm/thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698