OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef RUNTIME_VM_OS_H_ | 5 #ifndef RUNTIME_VM_OS_H_ |
6 #define RUNTIME_VM_OS_H_ | 6 #define RUNTIME_VM_OS_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 | 9 |
10 // Forward declarations. | 10 // Forward declarations. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // Sleep the currently executing thread for millis ms. | 89 // Sleep the currently executing thread for millis ms. |
90 static void Sleep(int64_t millis); | 90 static void Sleep(int64_t millis); |
91 | 91 |
92 // Sleep the currently executing thread for micros microseconds. | 92 // Sleep the currently executing thread for micros microseconds. |
93 static void SleepMicros(int64_t micros); | 93 static void SleepMicros(int64_t micros); |
94 | 94 |
95 // Debug break. | 95 // Debug break. |
96 static void DebugBreak(); | 96 static void DebugBreak(); |
97 | 97 |
| 98 // Returns the current program counter. |
| 99 static uintptr_t GetProgramCounter(); |
| 100 |
98 // Not all platform support strndup. | 101 // Not all platform support strndup. |
99 static char* StrNDup(const char* s, intptr_t n); | 102 static char* StrNDup(const char* s, intptr_t n); |
100 static intptr_t StrNLen(const char* s, intptr_t n); | 103 static intptr_t StrNLen(const char* s, intptr_t n); |
101 | 104 |
102 // Print formatted output to stdout/stderr for debugging. | 105 // Print formatted output to stdout/stderr for debugging. |
103 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 106 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
104 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 107 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
105 static void VFPrint(FILE* stream, const char* format, va_list args); | 108 static void VFPrint(FILE* stream, const char* format, va_list args); |
106 // Print formatted output info a buffer. | 109 // Print formatted output info a buffer. |
107 // | 110 // |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 static void Shutdown(); | 151 static void Shutdown(); |
149 | 152 |
150 static void Abort(); | 153 static void Abort(); |
151 | 154 |
152 static void Exit(int code); | 155 static void Exit(int code); |
153 }; | 156 }; |
154 | 157 |
155 } // namespace dart | 158 } // namespace dart |
156 | 159 |
157 #endif // RUNTIME_VM_OS_H_ | 160 #endif // RUNTIME_VM_OS_H_ |
OLD | NEW |