| 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 PLATFORM_THREAD_H_ | 5 #ifndef PLATFORM_THREAD_H_ |
| 6 #define PLATFORM_THREAD_H_ | 6 #define PLATFORM_THREAD_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 // Declare the OS-specific types ahead of defining the generic classes. | 10 // Declare the OS-specific types ahead of defining the generic classes. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 static int Start(ThreadStartFunction function, uword parameters); | 35 static int Start(ThreadStartFunction function, uword parameters); |
| 36 | 36 |
| 37 static ThreadLocalKey CreateThreadLocal(); | 37 static ThreadLocalKey CreateThreadLocal(); |
| 38 static void DeleteThreadLocal(ThreadLocalKey key); | 38 static void DeleteThreadLocal(ThreadLocalKey key); |
| 39 static uword GetThreadLocal(ThreadLocalKey key) { | 39 static uword GetThreadLocal(ThreadLocalKey key) { |
| 40 return ThreadInlineImpl::GetThreadLocal(key); | 40 return ThreadInlineImpl::GetThreadLocal(key); |
| 41 } | 41 } |
| 42 static void SetThreadLocal(ThreadLocalKey key, uword value); | 42 static void SetThreadLocal(ThreadLocalKey key, uword value); |
| 43 static intptr_t GetMaxStackSize(); | 43 static intptr_t GetMaxStackSize(); |
| 44 static ThreadId GetCurrentThreadId(); | 44 static ThreadId GetCurrentThreadId(); |
| 45 static bool Join(ThreadId id); |
| 45 static intptr_t ThreadIdToIntPtr(ThreadId id); | 46 static intptr_t ThreadIdToIntPtr(ThreadId id); |
| 46 static bool Compare(ThreadId a, ThreadId b); | 47 static bool Compare(ThreadId a, ThreadId b); |
| 47 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); | 48 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 | 51 |
| 51 class Mutex { | 52 class Mutex { |
| 52 public: | 53 public: |
| 53 Mutex(); | 54 Mutex(); |
| 54 ~Mutex(); | 55 ~Mutex(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 MonitorData data_; // OS-specific data. | 92 MonitorData data_; // OS-specific data. |
| 92 | 93 |
| 93 DISALLOW_COPY_AND_ASSIGN(Monitor); | 94 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 94 }; | 95 }; |
| 95 | 96 |
| 96 | 97 |
| 97 } // namespace dart | 98 } // namespace dart |
| 98 | 99 |
| 99 | 100 |
| 100 #endif // PLATFORM_THREAD_H_ | 101 #endif // PLATFORM_THREAD_H_ |
| OLD | NEW |