| 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_MACOS_H_ | 5 #ifndef BIN_EVENTHANDLER_MACOS_H_ |
| 6 #define BIN_EVENTHANDLER_MACOS_H_ | 6 #define BIN_EVENTHANDLER_MACOS_H_ |
| 7 | 7 |
| 8 #if !defined(BIN_EVENTHANDLER_H_) | 8 #if !defined(BIN_EVENTHANDLER_H_) |
| 9 #error Do not include eventhandler_macos.h directly; use eventhandler.h instead. | 9 #error Do not include eventhandler_macos.h directly; use eventhandler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 | 31 |
| 32 class SocketData { | 32 class SocketData { |
| 33 public: | 33 public: |
| 34 explicit SocketData(intptr_t fd) | 34 explicit SocketData(intptr_t fd) |
| 35 : fd_(fd), | 35 : fd_(fd), |
| 36 port_(0), | 36 port_(0), |
| 37 mask_(0), | 37 mask_(0), |
| 38 tracked_by_kqueue_(false), | 38 tracked_by_kqueue_(false), |
| 39 tokens_(8) { | 39 tokens_(16) { |
| 40 ASSERT(fd_ != -1); | 40 ASSERT(fd_ != -1); |
| 41 } | 41 } |
| 42 | 42 |
| 43 bool HasReadEvent(); | 43 bool HasReadEvent(); |
| 44 bool HasWriteEvent(); | 44 bool HasWriteEvent(); |
| 45 | 45 |
| 46 void Close() { | 46 void Close() { |
| 47 port_ = 0; | 47 port_ = 0; |
| 48 mask_ = 0; | 48 mask_ = 0; |
| 49 VOID_TEMP_FAILURE_RETRY(close(fd_)); | 49 VOID_TEMP_FAILURE_RETRY(close(fd_)); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 TimeoutQueue timeout_queue_; | 115 TimeoutQueue timeout_queue_; |
| 116 bool shutdown_; | 116 bool shutdown_; |
| 117 int interrupt_fds_[2]; | 117 int interrupt_fds_[2]; |
| 118 int kqueue_fd_; | 118 int kqueue_fd_; |
| 119 }; | 119 }; |
| 120 | 120 |
| 121 } // namespace bin | 121 } // namespace bin |
| 122 } // namespace dart | 122 } // namespace dart |
| 123 | 123 |
| 124 #endif // BIN_EVENTHANDLER_MACOS_H_ | 124 #endif // BIN_EVENTHANDLER_MACOS_H_ |
| OLD | NEW |