| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |