| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_FUCHSIA) | 6 #if defined(TARGET_OS_FUCHSIA) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> | 10 #include <errno.h> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 void OS::SleepMicros(int64_t micros) { | 170 void OS::SleepMicros(int64_t micros) { |
| 171 mx_nanosleep(micros * kNanosecondsPerMicrosecond); | 171 mx_nanosleep(micros * kNanosecondsPerMicrosecond); |
| 172 } | 172 } |
| 173 | 173 |
| 174 | 174 |
| 175 void OS::DebugBreak() { | 175 void OS::DebugBreak() { |
| 176 UNIMPLEMENTED(); | 176 UNIMPLEMENTED(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 | 179 |
| 180 uintptr_t DART_NOINLINE OS::GetProgramCounter() { |
| 181 return reinterpret_cast<uintptr_t>( |
| 182 __builtin_extract_return_addr(__builtin_return_address(0))); |
| 183 } |
| 184 |
| 185 |
| 180 char* OS::StrNDup(const char* s, intptr_t n) { | 186 char* OS::StrNDup(const char* s, intptr_t n) { |
| 181 return strndup(s, n); | 187 return strndup(s, n); |
| 182 } | 188 } |
| 183 | 189 |
| 184 | 190 |
| 185 intptr_t OS::StrNLen(const char* s, intptr_t n) { | 191 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
| 186 return strnlen(s, n); | 192 return strnlen(s, n); |
| 187 } | 193 } |
| 188 | 194 |
| 189 | 195 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 } | 311 } |
| 306 | 312 |
| 307 | 313 |
| 308 void OS::Exit(int code) { | 314 void OS::Exit(int code) { |
| 309 UNIMPLEMENTED(); | 315 UNIMPLEMENTED(); |
| 310 } | 316 } |
| 311 | 317 |
| 312 } // namespace dart | 318 } // namespace dart |
| 313 | 319 |
| 314 #endif // defined(TARGET_OS_FUCHSIA) | 320 #endif // defined(TARGET_OS_FUCHSIA) |
| OLD | NEW |