OLD | NEW |
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 enum InterruptFlag { | 203 enum InterruptFlag { |
204 #define V(NAME, Name) NAME, | 204 #define V(NAME, Name) NAME, |
205 INTERRUPT_LIST(V) | 205 INTERRUPT_LIST(V) |
206 #undef V | 206 #undef V |
207 NUMBER_OF_INTERRUPTS | 207 NUMBER_OF_INTERRUPTS |
208 }; | 208 }; |
209 | 209 |
210 bool CheckInterrupt(int flagbit); | 210 bool CheckInterrupt(int flagbit); |
211 void RequestInterrupt(int flagbit); | 211 void RequestInterrupt(int flagbit); |
212 void ClearInterrupt(int flagbit); | 212 void ClearInterrupt(int flagbit); |
| 213 bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock); |
213 | 214 |
214 void InvokeApiInterruptCallback(); | 215 void InvokeApiInterruptCallback(); |
215 | 216 |
216 // You should hold the ExecutionAccess lock when calling this method. | 217 // You should hold the ExecutionAccess lock when calling this method. |
217 bool has_pending_interrupts(const ExecutionAccess& lock) { | 218 bool has_pending_interrupts(const ExecutionAccess& lock) { |
218 // Sanity check: We shouldn't be asking about pending interrupts | 219 // Sanity check: We shouldn't be asking about pending interrupts |
219 // unless we're not postponing them anymore. | 220 // unless we're not postponing them anymore. |
220 ASSERT(!should_postpone_interrupts(lock)); | 221 ASSERT(!should_postpone_interrupts(lock)); |
221 return thread_local_.interrupt_flags_ != 0; | 222 return thread_local_.interrupt_flags_ != 0; |
222 } | 223 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 friend class Isolate; | 283 friend class Isolate; |
283 friend class StackLimitCheck; | 284 friend class StackLimitCheck; |
284 friend class PostponeInterruptsScope; | 285 friend class PostponeInterruptsScope; |
285 | 286 |
286 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 287 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
287 }; | 288 }; |
288 | 289 |
289 } } // namespace v8::internal | 290 } } // namespace v8::internal |
290 | 291 |
291 #endif // V8_EXECUTION_H_ | 292 #endif // V8_EXECUTION_H_ |
OLD | NEW |