| 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_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 req = rem; | 269 req = rem; |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 | 273 |
| 274 void OS::DebugBreak() { | 274 void OS::DebugBreak() { |
| 275 __builtin_trap(); | 275 __builtin_trap(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 | 278 |
| 279 uintptr_t DART_NOINLINE OS::GetProgramCounter() { | |
| 280 return reinterpret_cast<uintptr_t>( | |
| 281 __builtin_extract_return_addr(__builtin_return_address(0))); | |
| 282 } | |
| 283 | |
| 284 | |
| 285 char* OS::StrNDup(const char* s, intptr_t n) { | 279 char* OS::StrNDup(const char* s, intptr_t n) { |
| 286 return strndup(s, n); | 280 return strndup(s, n); |
| 287 } | 281 } |
| 288 | 282 |
| 289 | 283 |
| 290 intptr_t OS::StrNLen(const char* s, intptr_t n) { | 284 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
| 291 return strnlen(s, n); | 285 return strnlen(s, n); |
| 292 } | 286 } |
| 293 | 287 |
| 294 | 288 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 } | 438 } |
| 445 | 439 |
| 446 | 440 |
| 447 void OS::Exit(int code) { | 441 void OS::Exit(int code) { |
| 448 exit(code); | 442 exit(code); |
| 449 } | 443 } |
| 450 | 444 |
| 451 } // namespace dart | 445 } // namespace dart |
| 452 | 446 |
| 453 #endif // defined(TARGET_OS_ANDROID) | 447 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |