| 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 RUNTIME_BIN_THREAD_H_ | 5 #ifndef RUNTIME_BIN_THREAD_H_ |
| 6 #define RUNTIME_BIN_THREAD_H_ | 6 #define RUNTIME_BIN_THREAD_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 static ThreadLocalKey CreateThreadLocal(); | 48 static ThreadLocalKey CreateThreadLocal(); |
| 49 static void DeleteThreadLocal(ThreadLocalKey key); | 49 static void DeleteThreadLocal(ThreadLocalKey key); |
| 50 static uword GetThreadLocal(ThreadLocalKey key) { | 50 static uword GetThreadLocal(ThreadLocalKey key) { |
| 51 return ThreadInlineImpl::GetThreadLocal(key); | 51 return ThreadInlineImpl::GetThreadLocal(key); |
| 52 } | 52 } |
| 53 static void SetThreadLocal(ThreadLocalKey key, uword value); | 53 static void SetThreadLocal(ThreadLocalKey key, uword value); |
| 54 static intptr_t GetMaxStackSize(); | 54 static intptr_t GetMaxStackSize(); |
| 55 static ThreadId GetCurrentThreadId(); | 55 static ThreadId GetCurrentThreadId(); |
| 56 static intptr_t ThreadIdToIntPtr(ThreadId id); | 56 static intptr_t ThreadIdToIntPtr(ThreadId id); |
| 57 static bool Compare(ThreadId a, ThreadId b); | 57 static bool Compare(ThreadId a, ThreadId b); |
| 58 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); | |
| 59 | 58 |
| 60 static void InitOnce(); | 59 static void InitOnce(); |
| 61 | 60 |
| 62 private: | 61 private: |
| 63 DISALLOW_ALLOCATION(); | 62 DISALLOW_ALLOCATION(); |
| 64 DISALLOW_IMPLICIT_CONSTRUCTORS(Thread); | 63 DISALLOW_IMPLICIT_CONSTRUCTORS(Thread); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 | 66 |
| 68 class Mutex { | 67 class Mutex { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 MonitorData data_; // OS-specific data. | 104 MonitorData data_; // OS-specific data. |
| 106 | 105 |
| 107 DISALLOW_COPY_AND_ASSIGN(Monitor); | 106 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 } // namespace bin | 109 } // namespace bin |
| 111 } // namespace dart | 110 } // namespace dart |
| 112 | 111 |
| 113 | 112 |
| 114 #endif // RUNTIME_BIN_THREAD_H_ | 113 #endif // RUNTIME_BIN_THREAD_H_ |
| OLD | NEW |