| 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/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 ASSERT(retval == 0); | 118 ASSERT(retval == 0); |
| 119 if (stack_limit.rlim_cur > INT_MAX) { | 119 if (stack_limit.rlim_cur > INT_MAX) { |
| 120 retval = INT_MAX; | 120 retval = INT_MAX; |
| 121 } else { | 121 } else { |
| 122 retval = stack_limit.rlim_cur; | 122 retval = stack_limit.rlim_cur; |
| 123 } | 123 } |
| 124 return retval; | 124 return retval; |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 bool OS::AllowStackFrameIteratorFromAnotherThread() { |
| 129 return false; |
| 130 } |
| 131 |
| 132 |
| 128 int OS::NumberOfAvailableProcessors() { | 133 int OS::NumberOfAvailableProcessors() { |
| 129 return sysconf(_SC_NPROCESSORS_ONLN); | 134 return sysconf(_SC_NPROCESSORS_ONLN); |
| 130 } | 135 } |
| 131 | 136 |
| 132 | 137 |
| 133 void OS::Sleep(int64_t millis) { | 138 void OS::Sleep(int64_t millis) { |
| 134 int64_t micros = millis * kMicrosecondsPerMillisecond; | 139 int64_t micros = millis * kMicrosecondsPerMillisecond; |
| 135 SleepMicros(micros); | 140 SleepMicros(micros); |
| 136 } | 141 } |
| 137 | 142 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 277 } |
| 273 | 278 |
| 274 | 279 |
| 275 void OS::Exit(int code) { | 280 void OS::Exit(int code) { |
| 276 exit(code); | 281 exit(code); |
| 277 } | 282 } |
| 278 | 283 |
| 279 } // namespace dart | 284 } // namespace dart |
| 280 | 285 |
| 281 #endif // defined(TARGET_OS_MACOS) | 286 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |