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 "platform/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) |
| 7 |
5 #include "platform/thread.h" | 8 #include "platform/thread.h" |
6 | 9 |
7 #include <sys/errno.h> | 10 #include <sys/errno.h> // NOLINT |
8 | 11 |
9 #include "platform/assert.h" | 12 #include "platform/assert.h" |
10 | 13 |
11 namespace dart { | 14 namespace dart { |
12 | 15 |
13 #define VALIDATE_PTHREAD_RESULT(result) \ | 16 #define VALIDATE_PTHREAD_RESULT(result) \ |
14 if (result != 0) { \ | 17 if (result != 0) { \ |
15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ | 18 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ |
16 } | 19 } |
17 | 20 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 255 } |
253 | 256 |
254 | 257 |
255 void Monitor::NotifyAll() { | 258 void Monitor::NotifyAll() { |
256 // TODO(iposva): Do we need to track lock owners? | 259 // TODO(iposva): Do we need to track lock owners? |
257 int result = pthread_cond_broadcast(data_.cond()); | 260 int result = pthread_cond_broadcast(data_.cond()); |
258 VALIDATE_PTHREAD_RESULT(result); | 261 VALIDATE_PTHREAD_RESULT(result); |
259 } | 262 } |
260 | 263 |
261 } // namespace dart | 264 } // namespace dart |
| 265 |
| 266 #endif // defined(TARGET_OS_MACOS) |
OLD | NEW |