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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 enum InterruptFlag { | 196 enum InterruptFlag { |
197 #define V(NAME, Name) NAME, | 197 #define V(NAME, Name) NAME, |
198 INTERRUPT_LIST(V) | 198 INTERRUPT_LIST(V) |
199 #undef V | 199 #undef V |
200 NUMBER_OF_INTERRUPTS | 200 NUMBER_OF_INTERRUPTS |
201 }; | 201 }; |
202 | 202 |
203 bool CheckInterrupt(int flagbit); | 203 bool CheckInterrupt(int flagbit); |
204 void RequestInterrupt(int flagbit); | 204 void RequestInterrupt(int flagbit); |
205 void ClearInterrupt(int flagbit); | 205 void ClearInterrupt(int flagbit); |
206 bool CheckAndClearInterrupt(InterruptFlag flag, const ExecutionAccess& lock); | 206 bool CheckAndClearInterrupt(InterruptFlag flag); |
207 | 207 |
208 // You should hold the ExecutionAccess lock when calling this method. | 208 // You should hold the ExecutionAccess lock when calling this method. |
209 bool has_pending_interrupts(const ExecutionAccess& lock) { | 209 bool has_pending_interrupts(const ExecutionAccess& lock) { |
210 // Sanity check: We shouldn't be asking about pending interrupts | 210 // Sanity check: We shouldn't be asking about pending interrupts |
211 // unless we're not postponing them anymore. | 211 // unless we're not postponing them anymore. |
212 ASSERT(!should_postpone_interrupts(lock)); | 212 ASSERT(!should_postpone_interrupts(lock)); |
213 return thread_local_.interrupt_flags_ != 0; | 213 return thread_local_.interrupt_flags_ != 0; |
214 } | 214 } |
215 | 215 |
216 // You should hold the ExecutionAccess lock when calling this method. | 216 // You should hold the ExecutionAccess lock when calling this method. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 friend class Isolate; | 274 friend class Isolate; |
275 friend class StackLimitCheck; | 275 friend class StackLimitCheck; |
276 friend class PostponeInterruptsScope; | 276 friend class PostponeInterruptsScope; |
277 | 277 |
278 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 278 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
279 }; | 279 }; |
280 | 280 |
281 } } // namespace v8::internal | 281 } } // namespace v8::internal |
282 | 282 |
283 #endif // V8_EXECUTION_H_ | 283 #endif // V8_EXECUTION_H_ |
OLD | NEW |