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

Side by Side Diff: runtime/bin/thread_linux.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_android.cc ('k') | runtime/bin/thread_macos.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_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 #include "bin/thread_linux.h" 9 #include "bin/thread_linux.h"
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const int kStackSize = (128 * kWordSize * KB); 149 const int kStackSize = (128 * kWordSize * KB);
150 return kStackSize; 150 return kStackSize;
151 } 151 }
152 152
153 153
154 ThreadId Thread::GetCurrentThreadId() { 154 ThreadId Thread::GetCurrentThreadId() {
155 return pthread_self(); 155 return pthread_self();
156 } 156 }
157 157
158 158
159 bool Thread::Join(ThreadId id) {
160 return false;
161 }
162
163
164 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { 159 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) {
165 ASSERT(sizeof(id) == sizeof(intptr_t)); 160 ASSERT(sizeof(id) == sizeof(intptr_t));
166 return static_cast<intptr_t>(id); 161 return static_cast<intptr_t>(id);
167 } 162 }
168 163
169 164
170 bool Thread::Compare(ThreadId a, ThreadId b) { 165 bool Thread::Compare(ThreadId a, ThreadId b) {
171 return (pthread_equal(a, b) != 0); 166 return (pthread_equal(a, b) != 0);
172 } 167 }
173 168
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void Monitor::NotifyAll() { 328 void Monitor::NotifyAll() {
334 // TODO(iposva): Do we need to track lock owners? 329 // TODO(iposva): Do we need to track lock owners?
335 int result = pthread_cond_broadcast(data_.cond()); 330 int result = pthread_cond_broadcast(data_.cond());
336 VALIDATE_PTHREAD_RESULT(result); 331 VALIDATE_PTHREAD_RESULT(result);
337 } 332 }
338 333
339 } // namespace bin 334 } // namespace bin
340 } // namespace dart 335 } // namespace dart
341 336
342 #endif // defined(TARGET_OS_LINUX) 337 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/bin/thread_android.cc ('k') | runtime/bin/thread_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698