Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: runtime/vm/os_fuchsia.cc

Issue 2117593002: Fuchsia: Initial check-in. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/native_symbol_fuchsia.cc ('k') | runtime/vm/os_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #include "vm/globals.h"
6 #if defined(TARGET_OS_FUCHSIA)
7
8 #include "vm/os.h"
9
10 #include <magenta/syscalls.h>
11 #include <magenta/types.h>
12
13 #include "platform/assert.h"
14
15 namespace dart {
16
17 const char* OS::Name() {
18 return "fuchsia";
19 }
20
21
22 intptr_t OS::ProcessId() {
23 UNIMPLEMENTED();
24 return 0;
25 }
26
27
28 const char* OS::GetTimeZoneName(int64_t seconds_since_epoch) {
29 UNIMPLEMENTED();
30 return "";
31 }
32
33
34 int OS::GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch) {
35 UNIMPLEMENTED();
36 return 0;
37 }
38
39
40 int OS::GetLocalTimeZoneAdjustmentInSeconds() {
41 UNIMPLEMENTED();
42 return 0;
43 }
44
45
46 int64_t OS::GetCurrentTimeMillis() {
47 return GetCurrentTimeMicros() / 1000;
48 }
49
50
51 int64_t OS::GetCurrentTimeMicros() {
52 return _magenta_current_time() / 1000;
53 }
54
55
56 int64_t OS::GetCurrentMonotonicTicks() {
57 UNIMPLEMENTED();
58 return 0;
59 }
60
61
62 int64_t OS::GetCurrentMonotonicFrequency() {
63 UNIMPLEMENTED();
64 return 0;
65 }
66
67
68 int64_t OS::GetCurrentMonotonicMicros() {
69 UNIMPLEMENTED();
70 return 0;
71 }
72
73
74 int64_t OS::GetCurrentThreadCPUMicros() {
75 UNIMPLEMENTED();
76 return 0;
77 }
78
79
80 void* OS::AlignedAllocate(intptr_t size, intptr_t alignment) {
81 UNIMPLEMENTED();
82 return NULL;
83 }
84
85
86 void OS::AlignedFree(void* ptr) {
87 UNIMPLEMENTED();
88 }
89
90
91 // TODO(5411554): May need to hoist these architecture dependent code
92 // into a architecture specific file e.g: os_ia32_linux.cc
93 intptr_t OS::ActivationFrameAlignment() {
94 UNIMPLEMENTED();
95 return 0;
96 }
97
98
99 intptr_t OS::PreferredCodeAlignment() {
100 UNIMPLEMENTED();
101 return 0;
102 }
103
104
105 bool OS::AllowStackFrameIteratorFromAnotherThread() {
106 UNIMPLEMENTED();
107 return false;
108 }
109
110
111 int OS::NumberOfAvailableProcessors() {
112 UNIMPLEMENTED();
113 return 0;
114 }
115
116
117 void OS::Sleep(int64_t millis) {
118 UNIMPLEMENTED();
119 }
120
121
122 void OS::SleepMicros(int64_t micros) {
123 UNIMPLEMENTED();
124 }
125
126
127 void OS::DebugBreak() {
128 UNIMPLEMENTED();
129 }
130
131
132 char* OS::StrNDup(const char* s, intptr_t n) {
133 UNIMPLEMENTED();
134 return NULL;
135 }
136
137
138 intptr_t OS::StrNLen(const char* s, intptr_t n) {
139 UNIMPLEMENTED();
140 return 0;
141 }
142
143
144 void OS::Print(const char* format, ...) {
145 UNIMPLEMENTED();
146 }
147
148
149 void OS::VFPrint(FILE* stream, const char* format, va_list args) {
150 vfprintf(stream, format, args);
151 fflush(stream);
152 }
153
154
155 int OS::SNPrint(char* str, size_t size, const char* format, ...) {
156 UNIMPLEMENTED();
157 return 0;
158 }
159
160
161 int OS::VSNPrint(char* str, size_t size, const char* format, va_list args) {
162 UNIMPLEMENTED();
163 return 0;
164 }
165
166
167 char* OS::SCreate(Zone* zone, const char* format, ...) {
168 UNIMPLEMENTED();
169 return NULL;
170 }
171
172
173 char* OS::VSCreate(Zone* zone, const char* format, va_list args) {
174 UNIMPLEMENTED();
175 return NULL;
176 }
177
178
179 bool OS::StringToInt64(const char* str, int64_t* value) {
180 UNIMPLEMENTED();
181 return false;
182 }
183
184
185 void OS::RegisterCodeObservers() {
186 UNIMPLEMENTED();
187 }
188
189
190 void OS::PrintErr(const char* format, ...) {
191 va_list args;
192 va_start(args, format);
193 VFPrint(stderr, format, args);
194 va_end(args);
195 }
196
197
198 void OS::InitOnce() {
199 // TODO(5411554): For now we check that initonce is called only once,
200 // Once there is more formal mechanism to call InitOnce we can move
201 // this check there.
202 static bool init_once_called = false;
203 ASSERT(init_once_called == false);
204 init_once_called = true;
205 }
206
207
208 void OS::Shutdown() {
209 }
210
211
212 void OS::Abort() {
213 abort();
214 }
215
216
217 void OS::Exit(int code) {
218 UNIMPLEMENTED();
219 }
220
221 } // namespace dart
222
223 #endif // defined(TARGET_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/vm/native_symbol_fuchsia.cc ('k') | runtime/vm/os_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698