Beispiel #1
0
    bool thread_interrupted_p(STATE) {
      if(check_local_interrupts()) {
        return check_thread_raise_or_kill(state);
      }

      return false;
    }
Beispiel #2
0
  bool State::check_interrupts(GCToken gct, CallFrame* call_frame, void* end) {
    // First, we might be here because someone reset the stack_limit_ so that
    // we'd fall into here to check interrupts even if the stack is fine,
    //
    // So fix up the stack_limit_ if thats the case first.

    // If this is true, stack_limit_ was just changed to get our attention, reset
    // it now.
    if(!check_stack(call_frame, end)) return false;

    if(unlikely(check_local_interrupts())) {
      if(!process_async(call_frame)) return false;
    }

    // If the current thread is trying to step, debugger wise, then assist!
    if(vm_->thread_step()) {
      vm_->clear_thread_step();
      if(!Helpers::yield_debugger(this, gct, call_frame, cNil)) return false;
    }

    return true;
  }