Index: dart/runtime/bin/eventhandler.h |
diff --git a/dart/runtime/bin/eventhandler.h b/dart/runtime/bin/eventhandler.h |
index 54845d0e3f3517e43a9170a8ac6c8e8312ffe272..80efaca65775a1c88f9dc4eba0ee7cf391872cda 100644 |
--- a/dart/runtime/bin/eventhandler.h |
+++ b/dart/runtime/bin/eventhandler.h |
@@ -29,6 +29,14 @@ enum MessageFlags { |
kPipe = 17, |
}; |
+#define COMMAND_MASK ((1 << kCloseCommand) | \ |
+ (1 << kShutdownReadCommand) | \ |
+ (1 << kShutdownWriteCommand) | \ |
+ (1 << kReturnTokenCommand)) |
+#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 TOKEN_COUNT(data) (data & ((1 << kCloseCommand) - 1)) |
class TimeoutQueue { |
private: |