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

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

Issue 463993002: - Separate the thread implementation used in bin/ and vm/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "bin/eventhandler.h" 8 #include "bin/eventhandler.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
11 #include <pthread.h> // NOLINT 11 #include <pthread.h> // NOLINT
12 #include <stdio.h> // NOLINT 12 #include <stdio.h> // NOLINT
13 #include <string.h> // NOLINT 13 #include <string.h> // NOLINT
14 #include <sys/epoll.h> // NOLINT 14 #include <sys/epoll.h> // NOLINT
15 #include <sys/stat.h> // NOLINT 15 #include <sys/stat.h> // NOLINT
16 #include <sys/timerfd.h> // NOLINT 16 #include <sys/timerfd.h> // NOLINT
17 #include <unistd.h> // NOLINT 17 #include <unistd.h> // NOLINT
18 #include <fcntl.h> // NOLINT 18 #include <fcntl.h> // NOLINT
19 19
20 #include "bin/dartutils.h" 20 #include "bin/dartutils.h"
21 #include "bin/fdutils.h" 21 #include "bin/fdutils.h"
22 #include "bin/log.h" 22 #include "bin/log.h"
23 #include "bin/socket.h" 23 #include "bin/socket.h"
24 #include "platform/thread.h" 24 #include "bin/thread.h"
25 #include "platform/utils.h" 25 #include "platform/utils.h"
26 26
27 27
28 namespace dart { 28 namespace dart {
29 namespace bin { 29 namespace bin {
30 30
31 static const int kInterruptMessageSize = sizeof(InterruptMessage); 31 static const int kInterruptMessageSize = sizeof(InterruptMessage);
32 static const int kTimerId = -1; 32 static const int kTimerId = -1;
33 static const int kShutdownId = -2; 33 static const int kShutdownId = -2;
34 34
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { 363 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
364 // The hashmap does not support keys with value 0. 364 // The hashmap does not support keys with value 0.
365 return dart::Utils::WordHash(fd + 1); 365 return dart::Utils::WordHash(fd + 1);
366 } 366 }
367 367
368 } // namespace bin 368 } // namespace bin
369 } // namespace dart 369 } // namespace dart
370 370
371 #endif // defined(TARGET_OS_LINUX) 371 #endif // defined(TARGET_OS_LINUX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698