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/globals.h" | 9 #include "vm/globals.h" |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // NOTE: Destructor currently ignored on Windows (issue 23474). | 42 // NOTE: Destructor currently ignored on Windows (issue 23474). |
43 static ThreadLocalKey CreateThreadLocal(ThreadDestructor destructor = NULL); | 43 static ThreadLocalKey CreateThreadLocal(ThreadDestructor destructor = NULL); |
44 static void DeleteThreadLocal(ThreadLocalKey key); | 44 static void DeleteThreadLocal(ThreadLocalKey key); |
45 static uword GetThreadLocal(ThreadLocalKey key) { | 45 static uword GetThreadLocal(ThreadLocalKey key) { |
46 return ThreadInlineImpl::GetThreadLocal(key); | 46 return ThreadInlineImpl::GetThreadLocal(key); |
47 } | 47 } |
48 static void SetThreadLocal(ThreadLocalKey key, uword value); | 48 static void SetThreadLocal(ThreadLocalKey key, uword value); |
49 static intptr_t GetMaxStackSize(); | 49 static intptr_t GetMaxStackSize(); |
50 static ThreadId GetCurrentThreadId(); | 50 static ThreadId GetCurrentThreadId(); |
| 51 static ThreadId GetCurrentThreadTraceId(); |
51 static intptr_t CurrentCurrentThreadIdAsIntPtr() { | 52 static intptr_t CurrentCurrentThreadIdAsIntPtr() { |
52 return ThreadIdToIntPtr(GetCurrentThreadId()); | 53 return ThreadIdToIntPtr(GetCurrentThreadId()); |
53 } | 54 } |
54 static ThreadJoinId GetCurrentThreadJoinId(); | 55 static ThreadJoinId GetCurrentThreadJoinId(); |
55 static void Join(ThreadJoinId id); | 56 static void Join(ThreadJoinId id); |
56 static intptr_t ThreadIdToIntPtr(ThreadId id); | 57 static intptr_t ThreadIdToIntPtr(ThreadId id); |
57 static ThreadId ThreadIdFromIntPtr(intptr_t id); | 58 static ThreadId ThreadIdFromIntPtr(intptr_t id); |
58 static bool Compare(ThreadId a, ThreadId b); | 59 static bool Compare(ThreadId a, ThreadId b); |
59 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); | 60 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); |
60 }; | 61 }; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 MonitorData data_; // OS-specific data. | 113 MonitorData data_; // OS-specific data. |
113 | 114 |
114 DISALLOW_COPY_AND_ASSIGN(Monitor); | 115 DISALLOW_COPY_AND_ASSIGN(Monitor); |
115 }; | 116 }; |
116 | 117 |
117 | 118 |
118 } // namespace dart | 119 } // namespace dart |
119 | 120 |
120 | 121 |
121 #endif // VM_OS_THREAD_H_ | 122 #endif // VM_OS_THREAD_H_ |
OLD | NEW |