| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_MACOS_H_ | 5 #ifndef BIN_EVENTHANDLER_MACOS_H_ |
| 6 #define BIN_EVENTHANDLER_MACOS_H_ | 6 #define BIN_EVENTHANDLER_MACOS_H_ |
| 7 | 7 |
| 8 | 8 |
| 9 typedef struct { | 9 typedef struct { |
| 10 intptr_t id; | 10 intptr_t id; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void UnregisterFdWakeup(intptr_t id); | 35 void UnregisterFdWakeup(intptr_t id); |
| 36 void CloseFd(intptr_t id); | 36 void CloseFd(intptr_t id); |
| 37 void UnregisterFd(intptr_t id); | 37 void UnregisterFd(intptr_t id); |
| 38 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size); | 38 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size); |
| 39 void HandleTimeout(); | 39 void HandleTimeout(); |
| 40 static void* Poll(void* args); | 40 static void* Poll(void* args); |
| 41 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data); | 41 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data); |
| 42 void HandleInterruptFd(); | 42 void HandleInterruptFd(); |
| 43 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask); | 43 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask); |
| 44 Dart_Port PortFor(intptr_t fd); | 44 Dart_Port PortFor(intptr_t fd); |
| 45 bool IsListeningSocket(intptr_t fd); |
| 45 intptr_t GetPollEvents(struct pollfd* pollfd); | 46 intptr_t GetPollEvents(struct pollfd* pollfd); |
| 46 void SetPollEvents(struct pollfd* pollfds, intptr_t mask); | 47 void SetPollEvents(struct pollfd* pollfds, intptr_t mask); |
| 47 | 48 |
| 48 PortData* port_map_; | 49 PortData* port_map_; |
| 49 intptr_t port_map_entries_; | 50 intptr_t port_map_entries_; |
| 50 intptr_t port_map_size_; | 51 intptr_t port_map_size_; |
| 51 int64_t timeout_; // Time for next timeout. | 52 int64_t timeout_; // Time for next timeout. |
| 52 Dart_Port timeout_port_; | 53 Dart_Port timeout_port_; |
| 53 int interrupt_fds_[2]; | 54 int interrupt_fds_[2]; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 | 57 |
| 57 #endif // BIN_EVENTHANDLER_MACOS_H_ | 58 #endif // BIN_EVENTHANDLER_MACOS_H_ |
| OLD | NEW |