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 // We do not include platform_posix.h on purpose. That file | 7 // We do not include platform_posix.h on purpose. That file |
8 // should never be directly inported. platform.h is always | 8 // should never be directly inported. platform.h is always |
9 // the platform header to include. | 9 // the platform header to include. |
10 #include "src/shared/platform.h" // NOLINT | 10 #include "src/shared/platform.h" // NOLINT |
11 | 11 |
12 #include <platform.h> | 12 #include <platform.h> |
13 | 13 |
14 #include <err.h> | 14 #include <err.h> |
15 #include <kernel/thread.h> | 15 #include <kernel/thread.h> |
16 #include <kernel/semaphore.h> | 16 #include <kernel/semaphore.h> |
17 #include <sys/types.h> | 17 #include <sys/types.h> |
18 | 18 |
19 #include <stdlib.h> | 19 #include <stdlib.h> |
20 #include <stdio.h> | 20 #include <stdio.h> |
21 | 21 |
22 namespace fletch { | 22 namespace dartino { |
23 | 23 |
24 void GetPathOfExecutable(char* path, size_t path_length) { | 24 void GetPathOfExecutable(char* path, size_t path_length) { |
25 // We are built into the kernel ... | 25 // We are built into the kernel ... |
26 path[0] = '\0'; | 26 path[0] = '\0'; |
27 } | 27 } |
28 | 28 |
29 static uint64 time_launch; | 29 static uint64 time_launch; |
30 | 30 |
31 void Platform::Setup() { time_launch = GetMicroseconds(); } | 31 void Platform::Setup() { time_launch = GetMicroseconds(); } |
32 | 32 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 int Platform::FormatString(char* buffer, size_t length, const char* format, | 196 int Platform::FormatString(char* buffer, size_t length, const char* format, |
197 ...) { | 197 ...) { |
198 UNIMPLEMENTED(); | 198 UNIMPLEMENTED(); |
199 return 0; | 199 return 0; |
200 } | 200 } |
201 | 201 |
202 char* Platform::GetEnv(const char* name) { return NULL; } | 202 char* Platform::GetEnv(const char* name) { return NULL; } |
203 | 203 |
204 int Platform::MaxStackSizeInWords() { return 16 * KB; } | 204 int Platform::MaxStackSizeInWords() { return 16 * KB; } |
205 | 205 |
206 } // namespace fletch | 206 } // namespace dartino |
207 | 207 |
208 #endif // defined(FLETCH_TARGET_OS_LK) | 208 #endif // defined(DARTINO_TARGET_OS_LK) |
OLD | NEW |