| 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 #ifndef VM_OS_THREAD_H_ | 5 #ifndef VM_OS_THREAD_H_ |
| 6 #define VM_OS_THREAD_H_ | 6 #define VM_OS_THREAD_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 static uword GetThreadLocal(ThreadLocalKey key) { | 166 static uword GetThreadLocal(ThreadLocalKey key) { |
| 167 return ThreadInlineImpl::GetThreadLocal(key); | 167 return ThreadInlineImpl::GetThreadLocal(key); |
| 168 } | 168 } |
| 169 static ThreadId GetCurrentThreadId(); | 169 static ThreadId GetCurrentThreadId(); |
| 170 static void SetThreadLocal(ThreadLocalKey key, uword value); | 170 static void SetThreadLocal(ThreadLocalKey key, uword value); |
| 171 static intptr_t GetMaxStackSize(); | 171 static intptr_t GetMaxStackSize(); |
| 172 static void Join(ThreadJoinId id); | 172 static void Join(ThreadJoinId id); |
| 173 static intptr_t ThreadIdToIntPtr(ThreadId id); | 173 static intptr_t ThreadIdToIntPtr(ThreadId id); |
| 174 static ThreadId ThreadIdFromIntPtr(intptr_t id); | 174 static ThreadId ThreadIdFromIntPtr(intptr_t id); |
| 175 static bool Compare(ThreadId a, ThreadId b); | 175 static bool Compare(ThreadId a, ThreadId b); |
| 176 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); | |
| 177 | 176 |
| 178 // Called at VM startup and shutdown. | 177 // Called at VM startup and shutdown. |
| 179 static void InitOnce(); | 178 static void InitOnce(); |
| 180 | 179 |
| 181 static bool IsThreadInList(ThreadJoinId join_id); | 180 static bool IsThreadInList(ThreadJoinId join_id); |
| 182 | 181 |
| 183 static void DisableOSThreadCreation(); | 182 static void DisableOSThreadCreation(); |
| 184 static void EnableOSThreadCreation(); | 183 static void EnableOSThreadCreation(); |
| 185 | 184 |
| 186 static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize); | 185 static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 friend class SafepointMonitorLocker; | 344 friend class SafepointMonitorLocker; |
| 346 friend void Dart_TestMonitor(); | 345 friend void Dart_TestMonitor(); |
| 347 DISALLOW_COPY_AND_ASSIGN(Monitor); | 346 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 348 }; | 347 }; |
| 349 | 348 |
| 350 | 349 |
| 351 } // namespace dart | 350 } // namespace dart |
| 352 | 351 |
| 353 | 352 |
| 354 #endif // VM_OS_THREAD_H_ | 353 #endif // VM_OS_THREAD_H_ |
| OLD | NEW |