| 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_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
| 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 ASSERT(retval == 0); | 622 ASSERT(retval == 0); |
| 623 if (stack_limit.rlim_cur > INT_MAX) { | 623 if (stack_limit.rlim_cur > INT_MAX) { |
| 624 retval = INT_MAX; | 624 retval = INT_MAX; |
| 625 } else { | 625 } else { |
| 626 retval = stack_limit.rlim_cur; | 626 retval = stack_limit.rlim_cur; |
| 627 } | 627 } |
| 628 return retval; | 628 return retval; |
| 629 } | 629 } |
| 630 | 630 |
| 631 | 631 |
| 632 bool OS::AllowStackFrameIteratorFromAnotherThread() { |
| 633 return false; |
| 634 } |
| 635 |
| 636 |
| 632 int OS::NumberOfAvailableProcessors() { | 637 int OS::NumberOfAvailableProcessors() { |
| 633 return sysconf(_SC_NPROCESSORS_ONLN); | 638 return sysconf(_SC_NPROCESSORS_ONLN); |
| 634 } | 639 } |
| 635 | 640 |
| 636 | 641 |
| 637 void OS::Sleep(int64_t millis) { | 642 void OS::Sleep(int64_t millis) { |
| 638 int64_t micros = millis * kMicrosecondsPerMillisecond; | 643 int64_t micros = millis * kMicrosecondsPerMillisecond; |
| 639 SleepMicros(micros); | 644 SleepMicros(micros); |
| 640 } | 645 } |
| 641 | 646 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 } | 784 } |
| 780 | 785 |
| 781 | 786 |
| 782 void OS::Exit(int code) { | 787 void OS::Exit(int code) { |
| 783 exit(code); | 788 exit(code); |
| 784 } | 789 } |
| 785 | 790 |
| 786 } // namespace dart | 791 } // namespace dart |
| 787 | 792 |
| 788 #endif // defined(TARGET_OS_LINUX) | 793 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |