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

Side by Side Diff: src/execution.h

Issue 309533009: Release execution lock before dispatching interrupt handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_EXECUTION_H_ 5 #ifndef V8_EXECUTION_H_
6 #define V8_EXECUTION_H_ 6 #define V8_EXECUTION_H_
7 7
8 #include "handles.h" 8 #include "handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 enum InterruptFlag { 199 enum InterruptFlag {
200 #define V(NAME, Name) NAME, 200 #define V(NAME, Name) NAME,
201 INTERRUPT_LIST(V) 201 INTERRUPT_LIST(V)
202 #undef V 202 #undef V
203 NUMBER_OF_INTERRUPTS 203 NUMBER_OF_INTERRUPTS
204 }; 204 };
205 205
206 bool CheckInterrupt(int flagbit); 206 bool CheckInterrupt(int flagbit);
207 void RequestInterrupt(int flagbit); 207 void RequestInterrupt(int flagbit);
208 void ClearInterrupt(int flagbit); 208 void ClearInterrupt(int flagbit);
209 bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock); 209 bool CheckAndClearInterrupt(InterruptFlag flag);
210 210
211 // You should hold the ExecutionAccess lock when calling this method. 211 // You should hold the ExecutionAccess lock when calling this method.
212 bool has_pending_interrupts(const ExecutionAccess& lock) { 212 bool has_pending_interrupts(const ExecutionAccess& lock) {
213 // Sanity check: We shouldn't be asking about pending interrupts 213 // Sanity check: We shouldn't be asking about pending interrupts
214 // unless we're not postponing them anymore. 214 // unless we're not postponing them anymore.
215 ASSERT(!should_postpone_interrupts(lock)); 215 ASSERT(!should_postpone_interrupts(lock));
216 return thread_local_.interrupt_flags_ != 0; 216 return thread_local_.interrupt_flags_ != 0;
217 } 217 }
218 218
219 // You should hold the ExecutionAccess lock when calling this method. 219 // You should hold the ExecutionAccess lock when calling this method.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 friend class Isolate; 277 friend class Isolate;
278 friend class StackLimitCheck; 278 friend class StackLimitCheck;
279 friend class PostponeInterruptsScope; 279 friend class PostponeInterruptsScope;
280 280
281 DISALLOW_COPY_AND_ASSIGN(StackGuard); 281 DISALLOW_COPY_AND_ASSIGN(StackGuard);
282 }; 282 };
283 283
284 } } // namespace v8::internal 284 } } // namespace v8::internal
285 285
286 #endif // V8_EXECUTION_H_ 286 #endif // V8_EXECUTION_H_
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/execution.cc » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698