Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1023)

Side by Side Diff: runtime/vm/thread_interrupter_win.cc

Issue 796063006: Rename Thread -> OSThread. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/thread_interrupter_macos.cc ('k') | runtime/vm/thread_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/thread_interrupter.h" 10 #include "vm/thread_interrupter.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #else 45 #else
46 UNIMPLEMENTED(); 46 UNIMPLEMENTED();
47 #endif 47 #endif
48 return true; 48 return true;
49 } 49 }
50 return false; 50 return false;
51 } 51 }
52 52
53 53
54 static void Interrupt(InterruptableThreadState* state) { 54 static void Interrupt(InterruptableThreadState* state) {
55 ASSERT(!Thread::Compare(GetCurrentThreadId(), state->id)); 55 ASSERT(!OSThread::Compare(GetCurrentThreadId(), state->id));
56 HANDLE handle = OpenThread(THREAD_GET_CONTEXT | 56 HANDLE handle = OpenThread(THREAD_GET_CONTEXT |
57 THREAD_QUERY_INFORMATION | 57 THREAD_QUERY_INFORMATION |
58 THREAD_SUSPEND_RESUME, 58 THREAD_SUSPEND_RESUME,
59 false, 59 false,
60 state->id); 60 state->id);
61 ASSERT(handle != NULL); 61 ASSERT(handle != NULL);
62 DWORD result = SuspendThread(handle); 62 DWORD result = SuspendThread(handle);
63 if (result == kThreadError) { 63 if (result == kThreadError) {
64 if (FLAG_trace_thread_interrupter) { 64 if (FLAG_trace_thread_interrupter) {
65 OS::Print("ThreadInterrupted failed to suspend thread %p\n", 65 OS::Print("ThreadInterrupted failed to suspend thread %p\n",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 108
109 void ThreadInterrupter::InstallSignalHandler() { 109 void ThreadInterrupter::InstallSignalHandler() {
110 // Nothing to do on Windows. 110 // Nothing to do on Windows.
111 } 111 }
112 112
113 } // namespace dart 113 } // namespace dart
114 114
115 #endif // defined(TARGET_OS_WINDOWS) 115 #endif // defined(TARGET_OS_WINDOWS)
116 116
OLDNEW
« no previous file with comments | « runtime/vm/thread_interrupter_macos.cc ('k') | runtime/vm/thread_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698