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 #include "src/vm/event_handler.h" | 5 #include "src/vm/event_handler.h" |
6 | 6 |
7 #include "src/shared/utils.h" | 7 #include "src/shared/utils.h" |
8 #include "src/vm/object.h" | 8 #include "src/vm/object.h" |
9 #include "src/vm/port.h" | 9 #include "src/vm/port.h" |
10 #include "src/vm/process.h" | 10 #include "src/vm/process.h" |
11 #include "src/vm/scheduler.h" | 11 #include "src/vm/scheduler.h" |
12 #include "src/vm/thread.h" | 12 #include "src/vm/thread.h" |
13 | 13 |
14 namespace fletch { | 14 namespace dartino { |
15 | 15 |
16 EventHandler* EventHandler::event_handler_ = NULL; | 16 EventHandler* EventHandler::event_handler_ = NULL; |
17 | 17 |
18 void EventHandler::Setup() { | 18 void EventHandler::Setup() { |
19 ASSERT(event_handler_ == NULL); | 19 ASSERT(event_handler_ == NULL); |
20 event_handler_ = new EventHandler(); | 20 event_handler_ = new EventHandler(); |
21 } | 21 } |
22 | 22 |
23 void EventHandler::TearDown() { | 23 void EventHandler::TearDown() { |
24 ASSERT(event_handler_ != NULL); | 24 ASSERT(event_handler_ != NULL); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 port->Lock(); | 138 port->Lock(); |
139 Process* port_process = port->process(); | 139 Process* port_process = port->process(); |
140 if (port_process != NULL) { | 140 if (port_process != NULL) { |
141 port_process->mailbox()->EnqueueLargeInteger(port, value); | 141 port_process->mailbox()->EnqueueLargeInteger(port, value); |
142 port_process->program()->scheduler()->ResumeProcess(port_process); | 142 port_process->program()->scheduler()->ResumeProcess(port_process); |
143 } | 143 } |
144 port->Unlock(); | 144 port->Unlock(); |
145 if (release_port) port->DecrementRef(); | 145 if (release_port) port->DecrementRef(); |
146 } | 146 } |
147 | 147 |
148 } // namespace fletch | 148 } // namespace dartino |
OLD | NEW |