| 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_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
| 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/event.h> // NOLINT | 14 #include <sys/event.h> // NOLINT |
| 15 #include <unistd.h> // NOLINT | 15 #include <unistd.h> // NOLINT |
| 16 #include <fcntl.h> // NOLINT | 16 #include <fcntl.h> // NOLINT |
| 17 | 17 |
| 18 #include "bin/dartutils.h" | 18 #include "bin/dartutils.h" |
| 19 #include "bin/fdutils.h" | 19 #include "bin/fdutils.h" |
| 20 #include "bin/log.h" | 20 #include "bin/log.h" |
| 21 #include "bin/thread.h" |
| 21 #include "bin/utils.h" | 22 #include "bin/utils.h" |
| 22 #include "platform/hashmap.h" | 23 #include "platform/hashmap.h" |
| 23 #include "platform/thread.h" | |
| 24 #include "platform/utils.h" | 24 #include "platform/utils.h" |
| 25 | 25 |
| 26 | 26 |
| 27 namespace dart { | 27 namespace dart { |
| 28 namespace bin { | 28 namespace bin { |
| 29 | 29 |
| 30 static const int kInterruptMessageSize = sizeof(InterruptMessage); | 30 static const int kInterruptMessageSize = sizeof(InterruptMessage); |
| 31 static const int kInfinityTimeout = -1; | 31 static const int kInfinityTimeout = -1; |
| 32 static const int kTimerId = -1; | 32 static const int kTimerId = -1; |
| 33 static const int kShutdownId = -2; | 33 static const int kShutdownId = -2; |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 423 |
| 424 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { | 424 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { |
| 425 // The hashmap does not support keys with value 0. | 425 // The hashmap does not support keys with value 0. |
| 426 return dart::Utils::WordHash(fd + 1); | 426 return dart::Utils::WordHash(fd + 1); |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace bin | 429 } // namespace bin |
| 430 } // namespace dart | 430 } // namespace dart |
| 431 | 431 |
| 432 #endif // defined(TARGET_OS_MACOS) | 432 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |