Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(890)

Side by Side Diff: runtime/bin/thread_android.cc

Issue 1978153002: Uses an open thread handle as the ThreadJoinId on Windows. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/thread.h ('k') | runtime/bin/thread_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « runtime/bin/thread.h ('k') | runtime/bin/thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698