| 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 "bin/thread.h" | 8 #include "bin/thread.h" |
| 9 #include "bin/thread_android.h" | 9 #include "bin/thread_android.h" |
| 10 | 10 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const int kStackSize = (128 * kWordSize * KB); | 148 const int kStackSize = (128 * kWordSize * KB); |
| 149 return kStackSize; | 149 return kStackSize; |
| 150 } | 150 } |
| 151 | 151 |
| 152 | 152 |
| 153 ThreadId Thread::GetCurrentThreadId() { | 153 ThreadId Thread::GetCurrentThreadId() { |
| 154 return gettid(); | 154 return gettid(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 | 157 |
| 158 bool Thread::Join(ThreadId id) { | |
| 159 return false; | |
| 160 } | |
| 161 | |
| 162 | |
| 163 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { | 158 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { |
| 164 ASSERT(sizeof(id) == sizeof(intptr_t)); | 159 ASSERT(sizeof(id) == sizeof(intptr_t)); |
| 165 return static_cast<intptr_t>(id); | 160 return static_cast<intptr_t>(id); |
| 166 } | 161 } |
| 167 | 162 |
| 168 | 163 |
| 169 bool Thread::Compare(ThreadId a, ThreadId b) { | 164 bool Thread::Compare(ThreadId a, ThreadId b) { |
| 170 return (a == b); | 165 return (a == b); |
| 171 } | 166 } |
| 172 | 167 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 void Monitor::NotifyAll() { | 324 void Monitor::NotifyAll() { |
| 330 // TODO(iposva): Do we need to track lock owners? | 325 // TODO(iposva): Do we need to track lock owners? |
| 331 int result = pthread_cond_broadcast(data_.cond()); | 326 int result = pthread_cond_broadcast(data_.cond()); |
| 332 VALIDATE_PTHREAD_RESULT(result); | 327 VALIDATE_PTHREAD_RESULT(result); |
| 333 } | 328 } |
| 334 | 329 |
| 335 } // namespace bin | 330 } // namespace bin |
| 336 } // namespace dart | 331 } // namespace dart |
| 337 | 332 |
| 338 #endif // defined(TARGET_OS_ANDROID) | 333 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |