Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: runtime/bin/eventhandler_macos.h

Issue 208653012: Only return eventhandler tokens in stacks of 8, to avoid runtime calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review fixes. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/eventhandler_linux.cc ('k') | runtime/bin/eventhandler_macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_linux.cc ('k') | runtime/bin/eventhandler_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698