| 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" // NOLINT | 5 #include "platform/globals.h" // NOLINT |
| 6 #include "platform/signal_blocker.h" // NOLINT | |
| 7 | 6 |
| 8 #if defined(TARGET_OS_LINUX) | 7 #if defined(TARGET_OS_LINUX) |
| 9 | 8 |
| 10 #include "vm/os_thread.h" | 9 #include "vm/os_thread.h" |
| 11 | 10 |
| 12 #include <errno.h> // NOLINT | 11 #include <errno.h> // NOLINT |
| 13 #include <sys/resource.h> // NOLINT | 12 #include <sys/resource.h> // NOLINT |
| 14 #include <sys/syscall.h> // NOLINT | 13 #include <sys/syscall.h> // NOLINT |
| 15 #include <sys/time.h> // NOLINT | 14 #include <sys/time.h> // NOLINT |
| 16 | 15 |
| 17 #include "platform/assert.h" | 16 #include "platform/assert.h" |
| 17 #include "platform/signal_blocker.h" |
| 18 #include "platform/utils.h" | 18 #include "platform/utils.h" |
| 19 | 19 |
| 20 namespace dart { | 20 namespace dart { |
| 21 | 21 |
| 22 #define VALIDATE_PTHREAD_RESULT(result) \ | 22 #define VALIDATE_PTHREAD_RESULT(result) \ |
| 23 if (result != 0) { \ | 23 if (result != 0) { \ |
| 24 const int kBufferSize = 1024; \ | 24 const int kBufferSize = 1024; \ |
| 25 char error_buf[kBufferSize]; \ | 25 char error_buf[kBufferSize]; \ |
| 26 FATAL2("pthread error: %d (%s)", result, \ | 26 FATAL2("pthread error: %d (%s)", result, \ |
| 27 Utils::StrError(result, error_buf, kBufferSize)); \ | 27 Utils::StrError(result, error_buf, kBufferSize)); \ |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 void Monitor::NotifyAll() { | 448 void Monitor::NotifyAll() { |
| 449 // When running with assertions enabled we track the owner. | 449 // When running with assertions enabled we track the owner. |
| 450 ASSERT(IsOwnedByCurrentThread()); | 450 ASSERT(IsOwnedByCurrentThread()); |
| 451 int result = pthread_cond_broadcast(data_.cond()); | 451 int result = pthread_cond_broadcast(data_.cond()); |
| 452 VALIDATE_PTHREAD_RESULT(result); | 452 VALIDATE_PTHREAD_RESULT(result); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace dart | 455 } // namespace dart |
| 456 | 456 |
| 457 #endif // defined(TARGET_OS_LINUX) | 457 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |