OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #if defined(FLETCH_TARGET_OS_LK) | 5 #if defined(DARTINO_TARGET_OS_LK) |
6 | 6 |
7 #include "src/vm/thread.h" // NOLINT we don't include thread_posix.h. | 7 #include "src/vm/thread.h" // NOLINT we don't include thread_posix.h. |
8 | 8 |
9 #include <errno.h> | 9 #include <errno.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
12 #include "src/shared/platform.h" | 12 #include "src/shared/platform.h" |
13 | 13 |
14 namespace fletch { | 14 namespace dartino { |
15 | 15 |
16 void Thread::SetProcess(Process* process) { | 16 void Thread::SetProcess(Process* process) { |
17 // Unused since tick sample is not available on LK. | 17 // Unused since tick sample is not available on LK. |
18 } | 18 } |
19 | 19 |
20 Process* Thread::GetProcess() { | 20 Process* Thread::GetProcess() { |
21 // Unused since tick sample is not available on LK. | 21 // Unused since tick sample is not available on LK. |
22 return NULL; | 22 return NULL; |
23 } | 23 } |
24 | 24 |
(...skipping 18 matching lines...) Expand all Loading... |
43 thread_t* thread = | 43 thread_t* thread = |
44 thread_create("Dart thread", reinterpret_cast<thread_start_routine>(run), | 44 thread_create("Dart thread", reinterpret_cast<thread_start_routine>(run), |
45 data, DEFAULT_PRIORITY, 4096 /* stack size */); | 45 data, DEFAULT_PRIORITY, 4096 /* stack size */); |
46 int result = thread_resume(thread); | 46 int result = thread_resume(thread); |
47 if (result != 0) { | 47 if (result != 0) { |
48 fprintf(stderr, "Error %d", result); | 48 fprintf(stderr, "Error %d", result); |
49 } | 49 } |
50 return ThreadIdentifier(thread); | 50 return ThreadIdentifier(thread); |
51 } | 51 } |
52 | 52 |
53 } // namespace fletch | 53 } // namespace dartino |
54 | 54 |
55 #endif // defined(FLETCH_TARGET_OS_LK) | 55 #endif // defined(DARTINO_TARGET_OS_LK) |
OLD | NEW |