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

Unified Diff: runtime/bin/eventhandler_android.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 | « no previous file | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_android.h
diff --git a/runtime/bin/eventhandler_android.h b/runtime/bin/eventhandler_android.h
index 6b1bec6cad6a9c2899892529343457370f3ac702..2eee0af7997f89e108c956cde09c0bcc8547eb9a 100644
--- a/runtime/bin/eventhandler_android.h
+++ b/runtime/bin/eventhandler_android.h
@@ -33,7 +33,7 @@ class InterruptMessage {
class SocketData {
public:
explicit SocketData(intptr_t fd)
- : fd_(fd), port_(0), mask_(0), tokens_(8) {
+ : fd_(fd), port_(0), mask_(0), tokens_(16) {
ASSERT(fd_ != -1);
}
@@ -55,6 +55,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 | « no previous file | runtime/bin/eventhandler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698