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

Side by Side Diff: runtime/bin/eventhandler_macos.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 asiva@ Created 8 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 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_MACOS_H_ 5 #ifndef BIN_EVENTHANDLER_MACOS_H_
6 #define BIN_EVENTHANDLER_MACOS_H_ 6 #define BIN_EVENTHANDLER_MACOS_H_
7 7
8 #if !defined(BIN_EVENTHANDLER_H_) 8 #if !defined(BIN_EVENTHANDLER_H_)
9 #error Do not include eventhandler_macos.h directly; use eventhandler.h instead. 9 #error Do not include eventhandler_macos.h directly; use eventhandler.h instead.
10 #endif 10 #endif
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 SocketData* GetSocketData(intptr_t fd); 96 SocketData* GetSocketData(intptr_t fd);
97 void SendData(intptr_t id, Dart_Port dart_port, intptr_t data); 97 void SendData(intptr_t id, Dart_Port dart_port, intptr_t data);
98 void StartEventHandler(); 98 void StartEventHandler();
99 99
100 private: 100 private:
101 intptr_t GetTimeout(); 101 intptr_t GetTimeout();
102 bool GetInterruptMessage(InterruptMessage* msg); 102 bool GetInterruptMessage(InterruptMessage* msg);
103 struct pollfd* GetPollFds(intptr_t* size); 103 struct pollfd* GetPollFds(intptr_t* size);
104 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size); 104 void HandleEvents(struct pollfd* pollfds, int pollfds_size, int result_size);
105 void HandleTimeout(); 105 void HandleTimeout();
106 static void* Poll(void* args); 106 static void Poll(uword args);
107 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data); 107 void WakeupHandler(intptr_t id, Dart_Port dart_port, int64_t data);
108 void HandleInterruptFd(); 108 void HandleInterruptFd();
109 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask); 109 void SetPort(intptr_t fd, Dart_Port dart_port, intptr_t mask);
110 intptr_t GetPollEvents(struct pollfd* pollfd); 110 intptr_t GetPollEvents(struct pollfd* pollfd);
111 static void* GetHashmapKeyFromFd(intptr_t fd); 111 static void* GetHashmapKeyFromFd(intptr_t fd);
112 static uint32_t GetHashmapHashFromFd(intptr_t fd); 112 static uint32_t GetHashmapHashFromFd(intptr_t fd);
113 113
114 HashMap socket_map_; 114 HashMap socket_map_;
115 int64_t timeout_; // Time for next timeout. 115 int64_t timeout_; // Time for next timeout.
116 Dart_Port timeout_port_; 116 Dart_Port timeout_port_;
117 int interrupt_fds_[2]; 117 int interrupt_fds_[2];
118 }; 118 };
119 119
120 120
121 #endif // BIN_EVENTHANDLER_MACOS_H_ 121 #endif // BIN_EVENTHANDLER_MACOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698