| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef BIN_EVENTHANDLER_LINUX_H_ | 5 #ifndef BIN_EVENTHANDLER_LINUX_H_ |
| 6 #define BIN_EVENTHANDLER_LINUX_H_ | 6 #define BIN_EVENTHANDLER_LINUX_H_ |
| 7 | 7 |
| 8 #if !defined(BIN_EVENTHANDLER_H_) | 8 #if !defined(BIN_EVENTHANDLER_H_) |
| 9 #error Do not include eventhandler_linux.h directly; use eventhandler.h instead. | 9 #error Do not include eventhandler_linux.h directly; use eventhandler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 intptr_t fd() { return fd_; } | 57 intptr_t fd() { return fd_; } |
| 58 Dart_Port port() { return port_; } | 58 Dart_Port port() { return port_; } |
| 59 bool tracked_by_epoll() { return tracked_by_epoll_; } | 59 bool tracked_by_epoll() { return tracked_by_epoll_; } |
| 60 void set_tracked_by_epoll(bool value) { tracked_by_epoll_ = value; } | 60 void set_tracked_by_epoll(bool value) { tracked_by_epoll_ = value; } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 bool tracked_by_epoll_; | 63 bool tracked_by_epoll_; |
| 64 intptr_t fd_; | 64 intptr_t fd_; |
| 65 Dart_Port port_; | 65 Dart_Port port_; |
| 66 intptr_t mask_; | |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 | 68 |
| 70 class EventHandlerImplementation { | 69 class EventHandlerImplementation { |
| 71 public: | 70 public: |
| 72 EventHandlerImplementation(); | 71 EventHandlerImplementation(); |
| 73 ~EventHandlerImplementation(); | 72 ~EventHandlerImplementation(); |
| 74 | 73 |
| 75 // Gets the socket data structure for a given file | 74 // Gets the socket data structure for a given file |
| 76 // descriptor. Creates a new one if one is not found. | 75 // descriptor. Creates a new one if one is not found. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 94 bool shutdown_; | 93 bool shutdown_; |
| 95 int interrupt_fds_[2]; | 94 int interrupt_fds_[2]; |
| 96 int epoll_fd_; | 95 int epoll_fd_; |
| 97 int timer_fd_; | 96 int timer_fd_; |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 } // namespace bin | 99 } // namespace bin |
| 101 } // namespace dart | 100 } // namespace dart |
| 102 | 101 |
| 103 #endif // BIN_EVENTHANDLER_LINUX_H_ | 102 #endif // BIN_EVENTHANDLER_LINUX_H_ |
| OLD | NEW |