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_H_ | 5 #ifndef BIN_EVENTHANDLER_H_ |
6 #define BIN_EVENTHANDLER_H_ | 6 #define BIN_EVENTHANDLER_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/isolate_data.h" | 9 #include "bin/isolate_data.h" |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... | |
23 kDestroyedEvent = 4, | 23 kDestroyedEvent = 4, |
24 kCloseCommand = 8, | 24 kCloseCommand = 8, |
25 kShutdownReadCommand = 9, | 25 kShutdownReadCommand = 9, |
26 kShutdownWriteCommand = 10, | 26 kShutdownWriteCommand = 10, |
27 kReturnTokenCommand = 11, | 27 kReturnTokenCommand = 11, |
28 kListeningSocket = 16, | 28 kListeningSocket = 16, |
29 kPipe = 17, | 29 kPipe = 17, |
30 }; | 30 }; |
31 | 31 |
32 | 32 |
33 #define COMMAND_MASK(data) (data & ((1 << kCloseCommand) | \ | |
Søren Gjesse
2014/10/22 07:23:51
I think the COMMAND_MASK should just be the mask
kustermann
2014/10/23 21:59:23
Then it becomes more verbose & redundant on the ca
| |
34 (1 << kShutdownReadCommand) | \ | |
35 (1 << kShutdownWriteCommand) | \ | |
36 (1 << kReturnTokenCommand))) | |
37 | |
33 class TimeoutQueue { | 38 class TimeoutQueue { |
34 private: | 39 private: |
35 class Timeout { | 40 class Timeout { |
36 public: | 41 public: |
37 Timeout(Dart_Port port, int64_t timeout, Timeout* next) | 42 Timeout(Dart_Port port, int64_t timeout, Timeout* next) |
38 : port_(port), timeout_(timeout), next_(next) {} | 43 : port_(port), timeout_(timeout), next_(next) {} |
39 | 44 |
40 Dart_Port port() const { return port_; } | 45 Dart_Port port() const { return port_; } |
41 | 46 |
42 int64_t timeout() const { return timeout_; } | 47 int64_t timeout() const { return timeout_; } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 | 131 |
127 private: | 132 private: |
128 friend class EventHandlerImplementation; | 133 friend class EventHandlerImplementation; |
129 EventHandlerImplementation delegate_; | 134 EventHandlerImplementation delegate_; |
130 }; | 135 }; |
131 | 136 |
132 } // namespace bin | 137 } // namespace bin |
133 } // namespace dart | 138 } // namespace dart |
134 | 139 |
135 #endif // BIN_EVENTHANDLER_H_ | 140 #endif // BIN_EVENTHANDLER_H_ |
OLD | NEW |