| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static ThreadLocalKey CreateThreadLocal(ThreadDestructor destructor = NULL); | 42 static ThreadLocalKey CreateThreadLocal(ThreadDestructor destructor = NULL); |
| 43 static void DeleteThreadLocal(ThreadLocalKey key); | 43 static void DeleteThreadLocal(ThreadLocalKey key); |
| 44 static uword GetThreadLocal(ThreadLocalKey key) { | 44 static uword GetThreadLocal(ThreadLocalKey key) { |
| 45 return ThreadInlineImpl::GetThreadLocal(key); | 45 return ThreadInlineImpl::GetThreadLocal(key); |
| 46 } | 46 } |
| 47 static void SetThreadLocal(ThreadLocalKey key, uword value); | 47 static void SetThreadLocal(ThreadLocalKey key, uword value); |
| 48 static intptr_t GetMaxStackSize(); | 48 static intptr_t GetMaxStackSize(); |
| 49 static ThreadId GetCurrentThreadId(); | 49 static ThreadId GetCurrentThreadId(); |
| 50 static bool Join(ThreadId id); | 50 static bool Join(ThreadId id); |
| 51 static intptr_t ThreadIdToIntPtr(ThreadId id); | 51 static intptr_t ThreadIdToIntPtr(ThreadId id); |
| 52 static ThreadId ThreadIdFromIntPtr(intptr_t id); |
| 52 static bool Compare(ThreadId a, ThreadId b); | 53 static bool Compare(ThreadId a, ThreadId b); |
| 53 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); | 54 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 | 57 |
| 57 class Mutex { | 58 class Mutex { |
| 58 public: | 59 public: |
| 59 Mutex(); | 60 Mutex(); |
| 60 ~Mutex(); | 61 ~Mutex(); |
| 61 | 62 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 MonitorData data_; // OS-specific data. | 107 MonitorData data_; // OS-specific data. |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(Monitor); | 109 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 | 112 |
| 112 } // namespace dart | 113 } // namespace dart |
| 113 | 114 |
| 114 | 115 |
| 115 #endif // VM_OS_THREAD_H_ | 116 #endif // VM_OS_THREAD_H_ |
| OLD | NEW |