| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #if defined(FLETCH_TARGET_OS_WIN) | 5 #if defined(DARTINO_TARGET_OS_WIN) |
| 6 | 6 |
| 7 #include <winsock2.h> | 7 #include <winsock2.h> |
| 8 | 8 |
| 9 #include "src/vm/event_handler.h" | 9 #include "src/vm/event_handler.h" |
| 10 | 10 |
| 11 #include "src/shared/atomic.h" | 11 #include "src/shared/atomic.h" |
| 12 #include "src/shared/platform.h" | 12 #include "src/shared/platform.h" |
| 13 #include "src/shared/utils.h" | 13 #include "src/shared/utils.h" |
| 14 | 14 |
| 15 #include "src/vm/hash_set.h" | 15 #include "src/vm/hash_set.h" |
| 16 #include "src/vm/thread.h" | 16 #include "src/vm/thread.h" |
| 17 #include "src/vm/object.h" | 17 #include "src/vm/object.h" |
| 18 #include "src/vm/process.h" | 18 #include "src/vm/process.h" |
| 19 | 19 |
| 20 namespace fletch { | 20 namespace dartino { |
| 21 | 21 |
| 22 // Used to store information about the reason for an event. | 22 // Used to store information about the reason for an event. |
| 23 struct EventHandlerInfo { | 23 struct EventHandlerInfo { |
| 24 // Currently we only have sockets as event source. | 24 // Currently we only have sockets as event source. |
| 25 SOCKET socket; | 25 SOCKET socket; |
| 26 // The associated event we are waiting on. | 26 // The associated event we are waiting on. |
| 27 HANDLE event; | 27 HANDLE event; |
| 28 // The wait handle needed to unregister this wait. | 28 // The wait handle needed to unregister this wait. |
| 29 HANDLE wait_handle; | 29 HANDLE wait_handle; |
| 30 // The port to notify. | 30 // The port to notify. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 } | 211 } |
| 212 | 212 |
| 213 port->IncrementRef(); | 213 port->IncrementRef(); |
| 214 | 214 |
| 215 data->allocated.Insert(info); | 215 data->allocated.Insert(info); |
| 216 } | 216 } |
| 217 | 217 |
| 218 return process->program()->null_object(); | 218 return process->program()->null_object(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace fletch | 221 } // namespace dartino |
| 222 | 222 |
| 223 #endif // defined(FLETCH_TARGET_OS_WIN) | 223 #endif // defined(DARTINO_TARGET_OS_WIN) |
| OLD | NEW |