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 #include "platform/globals.h" | 5 #include "platform/globals.h" |
6 #if defined(TARGET_OS_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
7 | 7 |
8 #include "platform/thread.h" | 8 #include "platform/thread.h" |
9 | 9 |
10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 const int kStackSize = (128 * kWordSize * KB); | 142 const int kStackSize = (128 * kWordSize * KB); |
143 return kStackSize; | 143 return kStackSize; |
144 } | 144 } |
145 | 145 |
146 | 146 |
147 ThreadId Thread::GetCurrentThreadId() { | 147 ThreadId Thread::GetCurrentThreadId() { |
148 return gettid(); | 148 return gettid(); |
149 } | 149 } |
150 | 150 |
151 | 151 |
| 152 bool Thread::Join(ThreadId id) { |
| 153 return false; |
| 154 } |
| 155 |
| 156 |
152 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { | 157 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { |
153 ASSERT(sizeof(id) == sizeof(intptr_t)); | 158 ASSERT(sizeof(id) == sizeof(intptr_t)); |
154 return static_cast<intptr_t>(id); | 159 return static_cast<intptr_t>(id); |
155 } | 160 } |
156 | 161 |
157 | 162 |
158 bool Thread::Compare(ThreadId a, ThreadId b) { | 163 bool Thread::Compare(ThreadId a, ThreadId b) { |
159 return a == b; | 164 return a == b; |
160 } | 165 } |
161 | 166 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 317 |
313 void Monitor::NotifyAll() { | 318 void Monitor::NotifyAll() { |
314 // TODO(iposva): Do we need to track lock owners? | 319 // TODO(iposva): Do we need to track lock owners? |
315 int result = pthread_cond_broadcast(data_.cond()); | 320 int result = pthread_cond_broadcast(data_.cond()); |
316 VALIDATE_PTHREAD_RESULT(result); | 321 VALIDATE_PTHREAD_RESULT(result); |
317 } | 322 } |
318 | 323 |
319 } // namespace dart | 324 } // namespace dart |
320 | 325 |
321 #endif // defined(TARGET_OS_ANDROID) | 326 #endif // defined(TARGET_OS_ANDROID) |
OLD | NEW |