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

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

Issue 9196002: Move Mutex and Monitor from vm/ to platform/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed revire comments from ager@ Created 8 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/platform/thread_macos.h ('k') | runtime/platform/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.h" 5 #include "platform/thread.h"
6 6
7 #include <sys/errno.h> 7 #include <sys/errno.h>
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 #define VALIDATE_PTHREAD_RESULT(result) \ 13 #define VALIDATE_PTHREAD_RESULT(result) \
14 if (result != 0) { \ 14 if (result != 0) { \
15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ 15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 222
223 void Monitor::NotifyAll() { 223 void Monitor::NotifyAll() {
224 // TODO(iposva): Do we need to track lock owners? 224 // TODO(iposva): Do we need to track lock owners?
225 int result = pthread_cond_broadcast(data_.cond()); 225 int result = pthread_cond_broadcast(data_.cond());
226 VALIDATE_PTHREAD_RESULT(result); 226 VALIDATE_PTHREAD_RESULT(result);
227 } 227 }
228 228
229 } // namespace dart 229 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/thread_macos.h ('k') | runtime/platform/thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698