OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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(HOST_OS_FUCHSIA) | 6 #if defined(HOST_OS_FUCHSIA) |
7 | 7 |
8 #include "vm/thread_interrupter.h" | 8 #include "vm/thread_interrupter.h" |
9 | 9 |
10 #include <magenta/process.h> | 10 #include <magenta/process.h> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 224 } |
225 return MX_ERR_BAD_STATE; | 225 return MX_ERR_BAD_STATE; |
226 } | 226 } |
227 if (FLAG_trace_thread_interrupter) { | 227 if (FLAG_trace_thread_interrupter) { |
228 OS::PrintErr("ThreadInterrupter: Exceeded max suspend poll tries\n"); | 228 OS::PrintErr("ThreadInterrupter: Exceeded max suspend poll tries\n"); |
229 } | 229 } |
230 return MX_ERR_BAD_STATE; | 230 return MX_ERR_BAD_STATE; |
231 } | 231 } |
232 }; | 232 }; |
233 | 233 |
234 | |
235 bool ThreadInterrupter::IsDebuggerAttached() { | 234 bool ThreadInterrupter::IsDebuggerAttached() { |
236 return false; | 235 return false; |
237 } | 236 } |
238 | 237 |
239 | |
240 void ThreadInterrupter::InterruptThread(OSThread* thread) { | 238 void ThreadInterrupter::InterruptThread(OSThread* thread) { |
241 if (FLAG_trace_thread_interrupter) { | 239 if (FLAG_trace_thread_interrupter) { |
242 OS::PrintErr("ThreadInterrupter suspending %p\n", | 240 OS::PrintErr("ThreadInterrupter suspending %p\n", |
243 reinterpret_cast<void*>(thread->id())); | 241 reinterpret_cast<void*>(thread->id())); |
244 } | 242 } |
245 ThreadInterrupterFuchsia::Interrupt(thread); | 243 ThreadInterrupterFuchsia::Interrupt(thread); |
246 if (FLAG_trace_thread_interrupter) { | 244 if (FLAG_trace_thread_interrupter) { |
247 OS::PrintErr("ThreadInterrupter resuming %p\n", | 245 OS::PrintErr("ThreadInterrupter resuming %p\n", |
248 reinterpret_cast<void*>(thread->id())); | 246 reinterpret_cast<void*>(thread->id())); |
249 } | 247 } |
250 } | 248 } |
251 | 249 |
252 | |
253 void ThreadInterrupter::InstallSignalHandler() { | 250 void ThreadInterrupter::InstallSignalHandler() { |
254 // Nothing to do on Fuchsia. | 251 // Nothing to do on Fuchsia. |
255 } | 252 } |
256 | 253 |
257 | |
258 void ThreadInterrupter::RemoveSignalHandler() { | 254 void ThreadInterrupter::RemoveSignalHandler() { |
259 // Nothing to do on Fuchsia. | 255 // Nothing to do on Fuchsia. |
260 } | 256 } |
261 | 257 |
262 #endif // !PRODUCT | 258 #endif // !PRODUCT |
263 | 259 |
264 } // namespace dart | 260 } // namespace dart |
265 | 261 |
266 #endif // defined(HOST_OS_FUCHSIA) | 262 #endif // defined(HOST_OS_FUCHSIA) |
OLD | NEW |