| 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 req = rem; | 659 req = rem; |
| 660 } | 660 } |
| 661 } | 661 } |
| 662 | 662 |
| 663 | 663 |
| 664 void OS::DebugBreak() { | 664 void OS::DebugBreak() { |
| 665 #if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) | 665 #if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32) |
| 666 asm("int $3"); | 666 asm("int $3"); |
| 667 #elif defined(HOST_ARCH_ARM) | 667 #elif defined(HOST_ARCH_ARM) |
| 668 asm("svc #0x9f0001"); // __ARM_NR_breakpoint | 668 asm("svc #0x9f0001"); // __ARM_NR_breakpoint |
| 669 #elif defined(HOST_ARCH_MIPS) | 669 #elif defined(HOST_ARCH_MIPS) || defined(HOST_ARCH_ARM64) |
| 670 UNIMPLEMENTED(); | 670 UNIMPLEMENTED(); |
| 671 #else | 671 #else |
| 672 #error Unsupported architecture. | 672 #error Unsupported architecture. |
| 673 #endif | 673 #endif |
| 674 } | 674 } |
| 675 | 675 |
| 676 | 676 |
| 677 char* OS::StrNDup(const char* s, intptr_t n) { | 677 char* OS::StrNDup(const char* s, intptr_t n) { |
| 678 return strndup(s, n); | 678 return strndup(s, n); |
| 679 } | 679 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 } | 779 } |
| 780 | 780 |
| 781 | 781 |
| 782 void OS::Exit(int code) { | 782 void OS::Exit(int code) { |
| 783 exit(code); | 783 exit(code); |
| 784 } | 784 } |
| 785 | 785 |
| 786 } // namespace dart | 786 } // namespace dart |
| 787 | 787 |
| 788 #endif // defined(TARGET_OS_LINUX) | 788 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |