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

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

Issue 2433833005: Fuchsia: Fix eventhandler for changed syscall return (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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/eventhandler.h" 10 #include "bin/eventhandler.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 ASSERT(bytes == kInterruptMessageSize); 69 ASSERT(bytes == kInterruptMessageSize);
70 if (msg.id == kTimerId) { 70 if (msg.id == kTimerId) {
71 timeout_queue_.UpdateTimeout(msg.dart_port, msg.data); 71 timeout_queue_.UpdateTimeout(msg.dart_port, msg.data);
72 } else if (msg.id == kShutdownId) { 72 } else if (msg.id == kShutdownId) {
73 shutdown_ = true; 73 shutdown_ = true;
74 } else { 74 } else {
75 UNIMPLEMENTED(); 75 UNIMPLEMENTED();
76 } 76 }
77 } 77 }
78 // status == ERR_BAD_STATE when we try to read and there are no messages 78 // status == ERR_SHOULD_WAIT when we try to read and there are no messages
79 // available, so it is an error if we get here and status != ERR_BAD_STATE. 79 // available, so it is an error if we get here and status != ERR_SHOULD_WAIT.
80 if (status != ERR_BAD_STATE) { 80 if (status != ERR_SHOULD_WAIT) {
81 FATAL1("mx_msgpipe_read failed: %s\n", mx_status_get_string(status)); 81 FATAL1("mx_msgpipe_read failed: %s\n", mx_status_get_string(status));
82 } 82 }
83 } 83 }
84 84
85 85
86 void EventHandlerImplementation::HandleEvents() { 86 void EventHandlerImplementation::HandleEvents() {
87 // TODO(zra): Handle events from other handles. At the moment we are only 87 // TODO(zra): Handle events from other handles. At the moment we are only
88 // interrupted when there is a message on interrupt_handles_[0]. 88 // interrupted when there is a message on interrupt_handles_[0].
89 HandleInterruptFd(); 89 HandleInterruptFd();
90 } 90 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 int64_t data) { 164 int64_t data) {
165 WakeupHandler(id, dart_port, data); 165 WakeupHandler(id, dart_port, data);
166 } 166 }
167 167
168 } // namespace bin 168 } // namespace bin
169 } // namespace dart 169 } // namespace dart
170 170
171 #endif // defined(TARGET_OS_FUCHSIA) 171 #endif // defined(TARGET_OS_FUCHSIA)
172 172
173 #endif // !defined(DART_IO_DISABLED) 173 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698