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