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

Side by Side Diff: runtime/vm/os_thread_fuchsia.cc

Issue 2680123004: VM: Teach GetAndValidateIsolateStackBounds(...) to fallback to OS thread stack bounds. (Closed)
Patch Set: Done Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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" // NOLINT 5 #include "platform/globals.h" // NOLINT
6 #if defined(TARGET_OS_FUCHSIA) 6 #if defined(TARGET_OS_FUCHSIA)
7 7
8 #include "vm/os_thread.h" 8 #include "vm/os_thread.h"
9 #include "vm/os_thread_fuchsia.h" 9 #include "vm/os_thread_fuchsia.h"
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) { 196 ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) {
197 return static_cast<ThreadId>(id); 197 return static_cast<ThreadId>(id);
198 } 198 }
199 199
200 200
201 bool OSThread::Compare(ThreadId a, ThreadId b) { 201 bool OSThread::Compare(ThreadId a, ThreadId b) {
202 return pthread_equal(a, b) != 0; 202 return pthread_equal(a, b) != 0;
203 } 203 }
204 204
205 205
206 bool OSThread::GetCurrentStackBounds(uword* lower, uword* upper) {
207 return false;
208 }
209
210
206 Mutex::Mutex() { 211 Mutex::Mutex() {
207 pthread_mutexattr_t attr; 212 pthread_mutexattr_t attr;
208 int result = pthread_mutexattr_init(&attr); 213 int result = pthread_mutexattr_init(&attr);
209 VALIDATE_PTHREAD_RESULT(result); 214 VALIDATE_PTHREAD_RESULT(result);
210 215
211 #if defined(DEBUG) 216 #if defined(DEBUG)
212 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); 217 result = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
213 VALIDATE_PTHREAD_RESULT(result); 218 VALIDATE_PTHREAD_RESULT(result);
214 #endif // defined(DEBUG) 219 #endif // defined(DEBUG)
215 220
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 void Monitor::NotifyAll() { 424 void Monitor::NotifyAll() {
420 // When running with assertions enabled we track the owner. 425 // When running with assertions enabled we track the owner.
421 ASSERT(IsOwnedByCurrentThread()); 426 ASSERT(IsOwnedByCurrentThread());
422 int result = pthread_cond_broadcast(data_.cond()); 427 int result = pthread_cond_broadcast(data_.cond());
423 VALIDATE_PTHREAD_RESULT(result); 428 VALIDATE_PTHREAD_RESULT(result);
424 } 429 }
425 430
426 } // namespace dart 431 } // namespace dart
427 432
428 #endif // defined(TARGET_OS_FUCHSIA) 433 #endif // defined(TARGET_OS_FUCHSIA)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698