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

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

Issue 2935483002: Update Fuchsia-specific code to use the new MX_ error names (Closed)
Patch Set: not windows tho Created 3 years, 6 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/bin/process_fuchsia.cc ('k') | runtime/vm/os_thread_fuchsia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(HOST_OS_FUCHSIA) 6 #if defined(HOST_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 int OS::NumberOfAvailableProcessors() { 149 int OS::NumberOfAvailableProcessors() {
150 return sysconf(_SC_NPROCESSORS_CONF); 150 return sysconf(_SC_NPROCESSORS_CONF);
151 } 151 }
152 152
153 153
154 uintptr_t OS::MaxRSS() { 154 uintptr_t OS::MaxRSS() {
155 mx_info_task_stats_t task_stats; 155 mx_info_task_stats_t task_stats;
156 mx_handle_t process = mx_process_self(); 156 mx_handle_t process = mx_process_self();
157 mx_status_t status = mx_object_get_info( 157 mx_status_t status = mx_object_get_info(
158 process, MX_INFO_TASK_STATS, &task_stats, sizeof(task_stats), NULL, NULL); 158 process, MX_INFO_TASK_STATS, &task_stats, sizeof(task_stats), NULL, NULL);
159 return (status == NO_ERROR) 159 return (status == MX_OK)
160 ? (task_stats.mem_private_bytes + task_stats.mem_shared_bytes) 160 ? (task_stats.mem_private_bytes + task_stats.mem_shared_bytes)
161 : 0; 161 : 0;
162 } 162 }
163 163
164 164
165 void OS::Sleep(int64_t millis) { 165 void OS::Sleep(int64_t millis) {
166 SleepMicros(millis * kMicrosecondsPerMillisecond); 166 SleepMicros(millis * kMicrosecondsPerMillisecond);
167 } 167 }
168 168
169 169
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 312
313 313
314 void OS::Exit(int code) { 314 void OS::Exit(int code) {
315 UNIMPLEMENTED(); 315 UNIMPLEMENTED();
316 } 316 }
317 317
318 } // namespace dart 318 } // namespace dart
319 319
320 #endif // defined(HOST_OS_FUCHSIA) 320 #endif // defined(HOST_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/bin/process_fuchsia.cc ('k') | runtime/vm/os_thread_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698