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

Side by Side Diff: runtime/bin/thread_macos.cc

Issue 473763002: Fix Dartium build: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/bin/thread_linux.cc ('k') | runtime/bin/thread_win.cc » ('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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 9
10 #include <sys/errno.h> // NOLINT 10 #include <sys/errno.h> // NOLINT
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (r == KERN_SUCCESS) { 176 if (r == KERN_SUCCESS) {
177 *cpu_usage = (info->user_time.seconds * kMicrosecondsPerSecond) + 177 *cpu_usage = (info->user_time.seconds * kMicrosecondsPerSecond) +
178 info->user_time.microseconds; 178 info->user_time.microseconds;
179 return; 179 return;
180 } 180 }
181 } 181 }
182 *cpu_usage = 0; 182 *cpu_usage = 0;
183 } 183 }
184 184
185 185
186 void Thread::InitOnce() {
187 // Nothing to be done.
188 }
189
190
186 Mutex::Mutex() { 191 Mutex::Mutex() {
187 pthread_mutexattr_t attr; 192 pthread_mutexattr_t attr;
188 int result = pthread_mutexattr_init(&attr); 193 int result = pthread_mutexattr_init(&attr);
189 VALIDATE_PTHREAD_RESULT(result); 194 VALIDATE_PTHREAD_RESULT(result);
190 195
191 #if defined(DEBUG) 196 #if defined(DEBUG)
192 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); 197 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
193 VALIDATE_PTHREAD_RESULT(result); 198 VALIDATE_PTHREAD_RESULT(result);
194 #endif // defined(DEBUG) 199 #endif // defined(DEBUG)
195 200
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 void Monitor::NotifyAll() { 333 void Monitor::NotifyAll() {
329 // TODO(iposva): Do we need to track lock owners? 334 // TODO(iposva): Do we need to track lock owners?
330 int result = pthread_cond_broadcast(data_.cond()); 335 int result = pthread_cond_broadcast(data_.cond());
331 VALIDATE_PTHREAD_RESULT(result); 336 VALIDATE_PTHREAD_RESULT(result);
332 } 337 }
333 338
334 } // namespace bin 339 } // namespace bin
335 } // namespace dart 340 } // namespace dart
336 341
337 #endif // defined(TARGET_OS_MACOS) 342 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/thread_linux.cc ('k') | runtime/bin/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698