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 #include "src/execution.h" | 5 #include "src/execution.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 ExecutionAccess access(isolate_); | 406 ExecutionAccess access(isolate_); |
407 // Check the chain of PostponeInterruptsScopes for interception. | 407 // Check the chain of PostponeInterruptsScopes for interception. |
408 if (thread_local_.postpone_interrupts_ && | 408 if (thread_local_.postpone_interrupts_ && |
409 thread_local_.postpone_interrupts_->Intercept(flag)) { | 409 thread_local_.postpone_interrupts_->Intercept(flag)) { |
410 return; | 410 return; |
411 } | 411 } |
412 | 412 |
413 // Not intercepted. Set as active interrupt flag. | 413 // Not intercepted. Set as active interrupt flag. |
414 thread_local_.interrupt_flags_ |= flag; | 414 thread_local_.interrupt_flags_ |= flag; |
415 set_interrupt_limits(access); | 415 set_interrupt_limits(access); |
| 416 |
| 417 // If this isolate is waiting in a futex, notify it to wake up. |
| 418 isolate_->futex_wait_list_node()->NotifyWake(); |
416 } | 419 } |
417 | 420 |
418 | 421 |
419 void StackGuard::ClearInterrupt(InterruptFlag flag) { | 422 void StackGuard::ClearInterrupt(InterruptFlag flag) { |
420 ExecutionAccess access(isolate_); | 423 ExecutionAccess access(isolate_); |
421 // Clear the interrupt flag from the chain of PostponeInterruptsScopes. | 424 // Clear the interrupt flag from the chain of PostponeInterruptsScopes. |
422 for (PostponeInterruptsScope* current = thread_local_.postpone_interrupts_; | 425 for (PostponeInterruptsScope* current = thread_local_.postpone_interrupts_; |
423 current != NULL; | 426 current != NULL; |
424 current = current->prev_) { | 427 current = current->prev_) { |
425 current->intercepted_flags_ &= ~flag; | 428 current->intercepted_flags_ &= ~flag; |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 | 662 |
660 isolate_->counters()->stack_interrupts()->Increment(); | 663 isolate_->counters()->stack_interrupts()->Increment(); |
661 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 664 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
662 isolate_->runtime_profiler()->OptimizeNow(); | 665 isolate_->runtime_profiler()->OptimizeNow(); |
663 | 666 |
664 return isolate_->heap()->undefined_value(); | 667 return isolate_->heap()->undefined_value(); |
665 } | 668 } |
666 | 669 |
667 } // namespace internal | 670 } // namespace internal |
668 } // namespace v8 | 671 } // namespace v8 |
OLD | NEW |