OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 | 193 |
194 | 194 |
195 void EventHandlerImplementation::HandleEvents() { | 195 void EventHandlerImplementation::HandleEvents() { |
196 LOG_INFO("HandleEvents entry\n"); | 196 LOG_INFO("HandleEvents entry\n"); |
197 for (intptr_t i = 1; i < info_.size(); i++) { | 197 for (intptr_t i = 1; i < info_.size(); i++) { |
198 const mx_wait_item_t& wait_item = info_.items()[i]; | 198 const mx_wait_item_t& wait_item = info_.items()[i]; |
199 if (wait_item.pending & wait_item.waitfor) { | 199 if (wait_item.pending & wait_item.waitfor) { |
200 // Only the control handle has no descriptor info. | 200 // Only the control handle has no descriptor info. |
201 ASSERT(info_.descriptor_infos()[i] != NULL); | 201 ASSERT(info_.descriptor_infos()[i] != NULL); |
202 ASSERT(info_.handles()[i] != interrupt_handles_[0]); | 202 ASSERT(wait_item.handle != interrupt_handles_[0]); |
203 // TODO(zra): Handle events on other handles. At the moment we are | 203 // TODO(zra): Handle events on other handles. At the moment we are |
204 // only interrupted when there is a message on interrupt_handles_[0]. | 204 // only interrupted when there is a message on interrupt_handles_[0]. |
205 UNIMPLEMENTED(); | 205 UNIMPLEMENTED(); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 if ((info_.items()[0].pending & MX_SIGNAL_PEER_CLOSED) != 0) { | 209 if ((info_.items()[0].pending & MX_SIGNAL_PEER_CLOSED) != 0) { |
210 FATAL("EventHandlerImplementation::Poll: Unexpected peer closed\n"); | 210 FATAL("EventHandlerImplementation::Poll: Unexpected peer closed\n"); |
211 } | 211 } |
212 if ((info_.items()[0].pending & MX_SIGNAL_READABLE) != 0) { | 212 if ((info_.items()[0].pending & MX_SIGNAL_READABLE) != 0) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 int64_t data) { | 289 int64_t data) { |
290 WakeupHandler(id, dart_port, data); | 290 WakeupHandler(id, dart_port, data); |
291 } | 291 } |
292 | 292 |
293 } // namespace bin | 293 } // namespace bin |
294 } // namespace dart | 294 } // namespace dart |
295 | 295 |
296 #endif // defined(TARGET_OS_FUCHSIA) | 296 #endif // defined(TARGET_OS_FUCHSIA) |
297 | 297 |
298 #endif // !defined(DART_IO_DISABLED) | 298 #endif // !defined(DART_IO_DISABLED) |
OLD | NEW |