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

Side by Side Diff: runtime/bin/eventhandler_macos.cc

Issue 9323082: Fix Windows and Mac OS builds (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "bin/eventhandler.h" 5 #include "bin/eventhandler.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <poll.h> 8 #include <poll.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 * The fd is unregistered. It gets re-registered when the request 303 * The fd is unregistered. It gets re-registered when the request
304 * was handled by dart. 304 * was handled by dart.
305 */ 305 */
306 intptr_t event_mask = GetPollEvents(&pollfds[i]); 306 intptr_t event_mask = GetPollEvents(&pollfds[i]);
307 if (event_mask != 0) { 307 if (event_mask != 0) {
308 intptr_t fd = pollfds[i].fd; 308 intptr_t fd = pollfds[i].fd;
309 SocketData* sd = GetSocketData(fd); 309 SocketData* sd = GetSocketData(fd);
310 Dart_Port port = sd->port(); 310 Dart_Port port = sd->port();
311 ASSERT(port != 0); 311 ASSERT(port != 0);
312 sd->Unregister(); 312 sd->Unregister();
313 DartUtils::PostInteger(port, event_mask); 313 DartUtils::PostInt32(port, event_mask);
314 } 314 }
315 } 315 }
316 } 316 }
317 HandleInterruptFd(); 317 HandleInterruptFd();
318 } 318 }
319 319
320 320
321 intptr_t EventHandlerImplementation::GetTimeout() { 321 intptr_t EventHandlerImplementation::GetTimeout() {
322 if (timeout_ == kInfinityTimeout) { 322 if (timeout_ == kInfinityTimeout) {
323 return kInfinityTimeout; 323 return kInfinityTimeout;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 void* EventHandlerImplementation::GetHashmapKeyFromFd(intptr_t fd) { 382 void* EventHandlerImplementation::GetHashmapKeyFromFd(intptr_t fd) {
383 // The hashmap does not support keys with value 0. 383 // The hashmap does not support keys with value 0.
384 return reinterpret_cast<void*>(fd + 1); 384 return reinterpret_cast<void*>(fd + 1);
385 } 385 }
386 386
387 387
388 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { 388 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
389 // The hashmap does not support keys with value 0. 389 // The hashmap does not support keys with value 0.
390 return dart::Utils::WordHash(fd + 1); 390 return dart::Utils::WordHash(fd + 1);
391 } 391 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698