| 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" |
| 11 #include "bin/eventhandler_fuchsia.h" | 11 #include "bin/eventhandler_fuchsia.h" |
| 12 | 12 |
| 13 #include <magenta/syscalls.h> | 13 #include <magenta/syscalls.h> |
| 14 #include <runtime/status.h> | 14 #include <runtime/status.h> |
| 15 | 15 |
| 16 #include "bin/thread.h" | 16 #include "bin/thread.h" |
| 17 #include "bin/utils.h" | 17 #include "bin/utils.h" |
| 18 | 18 |
| 19 namespace dart { | 19 namespace dart { |
| 20 namespace bin { | 20 namespace bin { |
| 21 | 21 |
| 22 EventHandlerImplementation::EventHandlerImplementation() { | 22 EventHandlerImplementation::EventHandlerImplementation() { |
| 23 mx_status_t status = mx_msgpipe_create(interrupt_handles_, 0); | 23 mx_status_t status = mx_msgpipe_create(interrupt_handles_, 0); |
| 24 if (status != NO_ERROR) { | 24 if (status != NO_ERROR) { |
| 25 FATAL1("mx_msgpipe_create failed: %s\n", mx_strstatus(status)); | 25 FATAL1("mx_msgpipe_create failed: %s\n", mx_strstatus(status)); |
| 26 } | 26 } |
| 27 shutdown_ = false; |
| 27 } | 28 } |
| 28 | 29 |
| 29 | 30 |
| 30 EventHandlerImplementation::~EventHandlerImplementation() { | 31 EventHandlerImplementation::~EventHandlerImplementation() { |
| 31 mx_status_t status = mx_handle_close(interrupt_handles_[0]); | 32 mx_status_t status = mx_handle_close(interrupt_handles_[0]); |
| 32 if (status != NO_ERROR) { | 33 if (status != NO_ERROR) { |
| 33 FATAL1("mx_handle_close failed: %s\n", mx_strstatus(status)); | 34 FATAL1("mx_handle_close failed: %s\n", mx_strstatus(status)); |
| 34 } | 35 } |
| 35 status = mx_handle_close(interrupt_handles_[1]); | 36 status = mx_handle_close(interrupt_handles_[1]); |
| 36 if (status != NO_ERROR) { | 37 if (status != NO_ERROR) { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 int64_t data) { | 164 int64_t data) { |
| 164 WakeupHandler(id, dart_port, data); | 165 WakeupHandler(id, dart_port, data); |
| 165 } | 166 } |
| 166 | 167 |
| 167 } // namespace bin | 168 } // namespace bin |
| 168 } // namespace dart | 169 } // namespace dart |
| 169 | 170 |
| 170 #endif // defined(TARGET_OS_FUCHSIA) | 171 #endif // defined(TARGET_OS_FUCHSIA) |
| 171 | 172 |
| 172 #endif // !defined(DART_IO_DISABLED) | 173 #endif // !defined(DART_IO_DISABLED) |
| OLD | NEW |