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

Unified Diff: runtime/bin/eventhandler_linux.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_linux.h
diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
index 54f02509531446572bf84b1e489df896cc95b19c..f6f3f9a2ac6f3885e76cbfee8c0f2b379778b8a6 100644
--- a/runtime/bin/eventhandler_linux.h
+++ b/runtime/bin/eventhandler_linux.h
@@ -31,7 +31,7 @@ class InterruptMessage {
class SocketData {
public:
- explicit SocketData(intptr_t fd) : fd_(fd), port_(0), mask_(0), tokens_(8) {
+ explicit SocketData(intptr_t fd) : fd_(fd), port_(0), mask_(0), tokens_(16) {
ASSERT(fd_ != -1);
}
@@ -53,6 +53,8 @@ class SocketData {
intptr_t fd() { return fd_; }
Dart_Port port() { return port_; }
+ bool IsListeningSocket() { return (mask_ & (1 << kListeningSocket)) != 0; }
+
// Returns true if the last token was taken.
bool TakeToken() {
ASSERT(tokens_ > 0);
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698