| 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" // NOLINT | 5 #include "platform/globals.h" // NOLINT |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
| 10 #include "vm/os_thread.h" | 10 #include "vm/os_thread.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const int kStackSize = (128 * kWordSize * KB); | 118 const int kStackSize = (128 * kWordSize * KB); |
| 119 return kStackSize; | 119 return kStackSize; |
| 120 } | 120 } |
| 121 | 121 |
| 122 | 122 |
| 123 ThreadId OSThread::GetCurrentThreadId() { | 123 ThreadId OSThread::GetCurrentThreadId() { |
| 124 return ::GetCurrentThreadId(); | 124 return ::GetCurrentThreadId(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 #ifndef PRODUCT |
| 128 ThreadId OSThread::GetCurrentThreadTraceId() { | 129 ThreadId OSThread::GetCurrentThreadTraceId() { |
| 129 return ::GetCurrentThreadId(); | 130 return ::GetCurrentThreadId(); |
| 130 } | 131 } |
| 132 #endif // PRODUCT |
| 131 | 133 |
| 132 | 134 |
| 133 ThreadJoinId OSThread::GetCurrentThreadJoinId(OSThread* thread) { | 135 ThreadJoinId OSThread::GetCurrentThreadJoinId(OSThread* thread) { |
| 134 ASSERT(thread != NULL); | 136 ASSERT(thread != NULL); |
| 135 // Make sure we're filling in the join id for the current thread. | 137 // Make sure we're filling in the join id for the current thread. |
| 136 ThreadId id = GetCurrentThreadId(); | 138 ThreadId id = GetCurrentThreadId(); |
| 137 ASSERT(thread->id() == id); | 139 ASSERT(thread->id() == id); |
| 138 // Make sure the join_id_ hasn't been set, yet. | 140 // Make sure the join_id_ hasn't been set, yet. |
| 139 DEBUG_ASSERT(thread->join_id_ == kInvalidThreadJoinId); | 141 DEBUG_ASSERT(thread->join_id_ == kInvalidThreadJoinId); |
| 140 HANDLE handle = OpenThread(SYNCHRONIZE, false, id); | 142 HANDLE handle = OpenThread(SYNCHRONIZE, false, id); |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 #pragma data_seg(".CRT$XLB") | 679 #pragma data_seg(".CRT$XLB") |
| 678 PIMAGE_TLS_CALLBACK p_thread_callback_dart = OnDartThreadExit; | 680 PIMAGE_TLS_CALLBACK p_thread_callback_dart = OnDartThreadExit; |
| 679 | 681 |
| 680 // Reset the default section. | 682 // Reset the default section. |
| 681 #pragma data_seg() | 683 #pragma data_seg() |
| 682 | 684 |
| 683 #endif // _WIN64 | 685 #endif // _WIN64 |
| 684 } // extern "C" | 686 } // extern "C" |
| 685 | 687 |
| 686 #endif // defined(TARGET_OS_WINDOWS) | 688 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |