OLD | NEW |
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 #include "platform/globals.h" |
10 | 11 |
11 namespace dart { | 12 namespace dart { |
12 | 13 |
13 #define VALIDATE_PTHREAD_RESULT(result) \ | 14 #define VALIDATE_PTHREAD_RESULT(result) \ |
14 if (result != 0) { \ | 15 if (result != 0) { \ |
15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ | 16 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ |
16 } | 17 } |
17 | 18 |
18 | 19 |
19 class ThreadStartData { | 20 class ThreadStartData { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 221 } |
221 | 222 |
222 | 223 |
223 void Monitor::NotifyAll() { | 224 void Monitor::NotifyAll() { |
224 // TODO(iposva): Do we need to track lock owners? | 225 // TODO(iposva): Do we need to track lock owners? |
225 int result = pthread_cond_broadcast(data_.cond()); | 226 int result = pthread_cond_broadcast(data_.cond()); |
226 VALIDATE_PTHREAD_RESULT(result); | 227 VALIDATE_PTHREAD_RESULT(result); |
227 } | 228 } |
228 | 229 |
229 } // namespace dart | 230 } // namespace dart |
OLD | NEW |