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

Side by Side Diff: runtime/bin/eventhandler_linux.h

Issue 9141005: Change the thread interface in runtime/platform and use it starting all threads (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from ager@ Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_EVENTHANDLER_LINUX_H_ 5 #ifndef BIN_EVENTHANDLER_LINUX_H_
6 #define BIN_EVENTHANDLER_LINUX_H_ 6 #define BIN_EVENTHANDLER_LINUX_H_
7 7
8 #if !defined(BIN_EVENTHANDLER_H_) 8 #if !defined(BIN_EVENTHANDLER_H_)
9 #error Do not include eventhandler_linux.h directly; use eventhandler.h instead. 9 #error Do not include eventhandler_linux.h directly; use eventhandler.h instead.
10 #endif 10 #endif
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SocketData* GetSocketData(intptr_t fd); 91 SocketData* GetSocketData(intptr_t fd);
92 void SendData(intptr_t id, Dart_Port dart_port, intptr_t data); 92 void SendData(intptr_t id, Dart_Port dart_port, intptr_t data);
93 void StartEventHandler(); 93 void StartEventHandler();
94 94
95 private: 95 private:
96 intptr_t GetTimeout(); 96 intptr_t GetTimeout();
97 bool GetInterruptMessage(InterruptMessage* msg); 97 bool GetInterruptMessage(InterruptMessage* msg);
98 struct pollfd* GetPollFds(intptr_t* size); 98 struct pollfd* GetPollFds(intptr_t* size);
99 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size); 99 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size);
100 void HandleTimeout(); 100 void HandleTimeout();
101 static void* Poll(void* args); 101 static void Poll(uword args);
102 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data); 102 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data);
103 void HandleInterruptFd(); 103 void HandleInterruptFd();
104 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask); 104 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask);
105 intptr_t GetPollEvents(struct pollfd* pollfd); 105 intptr_t GetPollEvents(struct pollfd* pollfd);
106 106
107 SocketData* socket_map_; 107 SocketData* socket_map_;
108 intptr_t socket_map_size_; 108 intptr_t socket_map_size_;
109 int64_t timeout_; // Time for next timeout. 109 int64_t timeout_; // Time for next timeout.
110 Dart_Port timeout_port_; 110 Dart_Port timeout_port_;
111 int interrupt_fds_[2]; 111 int interrupt_fds_[2];
112 }; 112 };
113 113
114 114
115 #endif // BIN_EVENTHANDLER_LINUX_H_ 115 #endif // BIN_EVENTHANDLER_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698