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

Side by Side Diff: runtime/vm/os_thread.h

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
« no previous file with comments | « no previous file | runtime/vm/os_thread_android.cc » ('j') | runtime/vm/profiler.cc » ('J')
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 #ifndef RUNTIME_VM_OS_THREAD_H_ 5 #ifndef RUNTIME_VM_OS_THREAD_H_
6 #define RUNTIME_VM_OS_THREAD_H_ 6 #define RUNTIME_VM_OS_THREAD_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 uword stack_upper = stack_base_; 101 uword stack_upper = stack_base_;
102 if (stack_upper == 0) { 102 if (stack_upper == 0) {
103 return false; 103 return false;
104 } 104 }
105 uword stack_lower = stack_upper - GetSpecifiedStackSize(); 105 uword stack_lower = stack_upper - GetSpecifiedStackSize();
106 *lower = stack_lower; 106 *lower = stack_lower;
107 *upper = stack_upper; 107 *upper = stack_upper;
108 return true; 108 return true;
109 } 109 }
110 110
111 static bool GetCurrentStackBounds(uword* lower, uword* upper);
112
111 // Used to temporarily disable or enable thread interrupts. 113 // Used to temporarily disable or enable thread interrupts.
112 void DisableThreadInterrupts(); 114 void DisableThreadInterrupts();
113 void EnableThreadInterrupts(); 115 void EnableThreadInterrupts();
114 bool ThreadInterruptsEnabled(); 116 bool ThreadInterruptsEnabled();
115 117
116 // The currently executing thread, or NULL if not yet initialized. 118 // The currently executing thread, or NULL if not yet initialized.
117 static OSThread* Current() { 119 static OSThread* Current() {
118 BaseThread* thread = GetCurrentTLS(); 120 BaseThread* thread = GetCurrentTLS();
119 OSThread* os_thread = NULL; 121 OSThread* os_thread = NULL;
120 if (thread != NULL) { 122 if (thread != NULL) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 friend class SafepointMonitorLocker; 344 friend class SafepointMonitorLocker;
343 friend void Dart_TestMonitor(); 345 friend void Dart_TestMonitor();
344 DISALLOW_COPY_AND_ASSIGN(Monitor); 346 DISALLOW_COPY_AND_ASSIGN(Monitor);
345 }; 347 };
346 348
347 349
348 } // namespace dart 350 } // namespace dart
349 351
350 352
351 #endif // RUNTIME_VM_OS_THREAD_H_ 353 #endif // RUNTIME_VM_OS_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/os_thread_android.cc » ('j') | runtime/vm/profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698