Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, 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 <sys/errno.h> | 5 #include <sys/errno.h> |
| 6 | 6 |
| 7 #include "platform/assert.h" | |
| 7 #include "vm/thread.h" | 8 #include "vm/thread.h" |
|
Ivan Posva
2012/01/13 23:22:06
First.
Søren Gjesse
2012/01/16 08:58:00
Done.
| |
| 8 | 9 |
| 9 #include "vm/assert.h" | |
| 10 | |
| 11 namespace dart { | 10 namespace dart { |
| 12 | 11 |
| 13 #define VALIDATE_PTHREAD_RESULT(result) \ | 12 #define VALIDATE_PTHREAD_RESULT(result) \ |
| 14 if (result != 0) { \ | 13 if (result != 0) { \ |
| 15 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ | 14 FATAL2("pthread error: %d (%s)", result, strerror(result)); \ |
| 16 } | 15 } |
| 17 | 16 |
| 18 | 17 |
| 19 class ThreadStartData { | 18 class ThreadStartData { |
| 20 public: | 19 public: |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 } | 219 } |
| 221 | 220 |
| 222 | 221 |
| 223 void Monitor::NotifyAll() { | 222 void Monitor::NotifyAll() { |
| 224 // TODO(iposva): Do we need to track lock owners? | 223 // TODO(iposva): Do we need to track lock owners? |
| 225 int result = pthread_cond_broadcast(data_.cond()); | 224 int result = pthread_cond_broadcast(data_.cond()); |
| 226 VALIDATE_PTHREAD_RESULT(result); | 225 VALIDATE_PTHREAD_RESULT(result); |
| 227 } | 226 } |
| 228 | 227 |
| 229 } // namespace dart | 228 } // namespace dart |
| OLD | NEW |