| Index: runtime/bin/eventhandler_linux.h
|
| diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
|
| index 763b48e97258cfac5f21a3b7b142d476a09ca1f7..cb216927e99ed51ad131752f516f6ad43573887c 100644
|
| --- a/runtime/bin/eventhandler_linux.h
|
| +++ b/runtime/bin/eventhandler_linux.h
|
| @@ -8,7 +8,7 @@
|
| #include <unistd.h>
|
| #include <sys/socket.h>
|
|
|
| -#include "bin/thread_pool.h"
|
| +#include "bin/hashmap.h"
|
|
|
| class InterruptMessage {
|
| public:
|
| @@ -26,6 +26,10 @@ enum PortDataFlags {
|
|
|
| class SocketData {
|
| public:
|
| + SocketData(intptr_t fd) : fd_(fd), port_(0), mask_(0), flags_(0) {
|
| + ASSERT(fd_ != -1);
|
| + }
|
| +
|
| intptr_t GetPollEvents();
|
|
|
| void Unregister() {
|
| @@ -67,7 +71,6 @@ class SocketData {
|
| }
|
|
|
| intptr_t fd() { return fd_; }
|
| - void set_fd(intptr_t fd) { fd_ = fd; }
|
| Dart_Port port() { return port_; }
|
| intptr_t mask() { return mask_; }
|
|
|
| @@ -99,9 +102,10 @@ class EventHandlerImplementation {
|
| void HandleInterruptFd();
|
| void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask);
|
| intptr_t GetPollEvents(struct pollfd* pollfd);
|
| + static void* GetHashmapKeyFromFd(intptr_t fd);
|
| + static uint32_t GetHashmapHashFromFd(intptr_t fd);
|
|
|
| - SocketData* socket_map_;
|
| - intptr_t socket_map_size_;
|
| + HashMap socket_map_;
|
| int64_t timeout_; // Time for next timeout.
|
| Dart_Port timeout_port_;
|
| int interrupt_fds_[2];
|
|
|