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

Unified Diff: dart/runtime/bin/eventhandler.h

Issue 900363004: Introduce a kSetEventMaskCommand, some cleanups in windows eventhandler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 5 years, 10 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 | dart/runtime/bin/eventhandler_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/eventhandler.h
diff --git a/dart/runtime/bin/eventhandler.h b/dart/runtime/bin/eventhandler.h
index 7968ac957b5a2210e7c9656bd705e407764508f3..70636bf80df43dd5128bacba69f7ed6ad7392b5d 100644
--- a/dart/runtime/bin/eventhandler.h
+++ b/dart/runtime/bin/eventhandler.h
@@ -25,6 +25,7 @@ enum MessageFlags {
kShutdownReadCommand = 9,
kShutdownWriteCommand = 10,
kReturnTokenCommand = 11,
+ kSetEventMaskCommand = 12,
kListeningSocket = 16,
kPipe = 17,
};
@@ -32,10 +33,19 @@ enum MessageFlags {
#define COMMAND_MASK ((1 << kCloseCommand) | \
(1 << kShutdownReadCommand) | \
(1 << kShutdownWriteCommand) | \
- (1 << kReturnTokenCommand))
+ (1 << kReturnTokenCommand) | \
+ (1 << kSetEventMaskCommand))
+#define EVENT_MASK ((1 << kInEvent) | \
+ (1 << kOutEvent) | \
+ (1 << kErrorEvent) | \
+ (1 << kCloseEvent) | \
+ (1 << kDestroyedEvent))
#define IS_COMMAND(data, command_bit) \
((data & COMMAND_MASK) == (1 << command_bit)) // NOLINT
-#define ASSERT_NO_COMMAND(data) ASSERT((data & COMMAND_MASK) == 0) // NOLINT
+#define IS_EVENT(data, event_bit) \
+ ((data & EVENT_MASK) == (1 << event_bit)) // NOLINT
+#define IS_LISTENING_SOCKET(data) \
+ ((data & (1 << kListeningSocket)) != 0) // NOLINT
#define TOKEN_COUNT(data) (data & ((1 << kCloseCommand) - 1))
class TimeoutQueue {
« no previous file with comments | « no previous file | dart/runtime/bin/eventhandler_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698