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

Side by Side Diff: runtime/platform/thread_macos.cc

Issue 294193003: Fix thread-interrupter shutdown on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup based on typedef fix. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/platform/thread_linux.cc ('k') | runtime/platform/thread_win.h » ('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_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "platform/thread.h" 8 #include "platform/thread.h"
9 9
10 #include <sys/errno.h> // NOLINT 10 #include <sys/errno.h> // NOLINT
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const int kStackSize = (128 * kWordSize * KB); 135 const int kStackSize = (128 * kWordSize * KB);
136 return kStackSize; 136 return kStackSize;
137 } 137 }
138 138
139 139
140 ThreadId Thread::GetCurrentThreadId() { 140 ThreadId Thread::GetCurrentThreadId() {
141 return pthread_self(); 141 return pthread_self();
142 } 142 }
143 143
144 144
145 bool Thread::Join(ThreadId id) {
146 return false;
147 }
148
149
145 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) { 150 intptr_t Thread::ThreadIdToIntPtr(ThreadId id) {
146 ASSERT(sizeof(id) == sizeof(intptr_t)); 151 ASSERT(sizeof(id) == sizeof(intptr_t));
147 return reinterpret_cast<intptr_t>(id); 152 return reinterpret_cast<intptr_t>(id);
148 } 153 }
149 154
150 155
151 bool Thread::Compare(ThreadId a, ThreadId b) { 156 bool Thread::Compare(ThreadId a, ThreadId b) {
152 return pthread_equal(a, b) != 0; 157 return pthread_equal(a, b) != 0;
153 } 158 }
154 159
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 322
318 void Monitor::NotifyAll() { 323 void Monitor::NotifyAll() {
319 // TODO(iposva): Do we need to track lock owners? 324 // TODO(iposva): Do we need to track lock owners?
320 int result = pthread_cond_broadcast(data_.cond()); 325 int result = pthread_cond_broadcast(data_.cond());
321 VALIDATE_PTHREAD_RESULT(result); 326 VALIDATE_PTHREAD_RESULT(result);
322 } 327 }
323 328
324 } // namespace dart 329 } // namespace dart
325 330
326 #endif // defined(TARGET_OS_MACOS) 331 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/platform/thread_linux.cc ('k') | runtime/platform/thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698