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

Side by Side Diff: runtime/bin/process_fuchsia.cc

Issue 2688303003: Use the new mx_object_wait_* name (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | runtime/bin/run_vm_tests_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 #if !defined(DART_IO_DISABLED) 5 #if !defined(DART_IO_DISABLED)
6 6
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #if defined(TARGET_OS_FUCHSIA) 8 #if defined(TARGET_OS_FUCHSIA)
9 9
10 #include "bin/process.h" 10 #include "bin/process.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 items_to_remove_ = reinterpret_cast<intptr_t*>( 229 items_to_remove_ = reinterpret_cast<intptr_t*>(
230 malloc(item_capacity_ * sizeof(*items_to_remove_))); 230 malloc(item_capacity_ * sizeof(*items_to_remove_)));
231 231
232 // The interrupt handle is fixed to the first entry. 232 // The interrupt handle is fixed to the first entry.
233 items_[0].handle = interrupt_out_; 233 items_[0].handle = interrupt_out_;
234 items_[0].waitfor = MX_SOCKET_READABLE | MX_SOCKET_PEER_CLOSED; 234 items_[0].waitfor = MX_SOCKET_READABLE | MX_SOCKET_PEER_CLOSED;
235 items_[0].pending = MX_SIGNAL_NONE; 235 items_[0].pending = MX_SIGNAL_NONE;
236 item_count_ = 1; 236 item_count_ = 1;
237 237
238 while (!do_shutdown_) { 238 while (!do_shutdown_) {
239 LOG_INFO("ExitCodeHandler Calling mx_handle_wait_many: %ld items\n", 239 LOG_INFO("ExitCodeHandler Calling mx_object_wait_many: %ld items\n",
240 item_count_); 240 item_count_);
241 mx_status_t status = 241 mx_status_t status =
242 mx_handle_wait_many(items_, item_count_, MX_TIME_INFINITE); 242 mx_object_wait_many(items_, item_count_, MX_TIME_INFINITE);
243 if (status < 0) { 243 if (status < 0) {
244 FATAL1("Exit code handler handle wait failed: %s\n", 244 FATAL1("Exit code handler handle wait failed: %s\n",
245 mx_status_get_string(status)); 245 mx_status_get_string(status));
246 } 246 }
247 LOG_INFO("ExitCodeHandler mx_handle_wait_many returned\n"); 247 LOG_INFO("ExitCodeHandler mx_object_wait_many returned\n");
248 248
249 bool have_interrupt = false; 249 bool have_interrupt = false;
250 intptr_t remove_count = 0; 250 intptr_t remove_count = 0;
251 for (intptr_t i = 0; i < item_count_; i++) { 251 for (intptr_t i = 0; i < item_count_; i++) {
252 if (items_[i].pending == MX_SIGNAL_NONE) { 252 if (items_[i].pending == MX_SIGNAL_NONE) {
253 continue; 253 continue;
254 } 254 }
255 if (i == 0) { 255 if (i == 0) {
256 LOG_INFO("ExitCodeHandler thread saw interrupt\n"); 256 LOG_INFO("ExitCodeHandler thread saw interrupt\n");
257 have_interrupt = true; 257 have_interrupt = true;
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 void Process::ClearSignalHandler(intptr_t signal) { 815 void Process::ClearSignalHandler(intptr_t signal) {
816 UNIMPLEMENTED(); 816 UNIMPLEMENTED();
817 } 817 }
818 818
819 } // namespace bin 819 } // namespace bin
820 } // namespace dart 820 } // namespace dart
821 821
822 #endif // defined(TARGET_OS_FUCHSIA) 822 #endif // defined(TARGET_OS_FUCHSIA)
823 823
824 #endif // !defined(DART_IO_DISABLED) 824 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/run_vm_tests_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698