Пример #1
0
void VMProcess::loop() {
  while (true) {
    assert(vm_operation(), "A VM_Operation should be present");
    vm_operation()->evaluate();
    DeltaProcess* p = vm_operation()->calling_process();
    _vm_operation = NULL;
    if (p) {
      transfer_to(p);
    } else {
      transfer_to(DeltaProcess::scheduler());
    }
  }
}
Пример #2
0
void VMProcess::loop() {
  while (true) {
    assert(vm_operation(), "A VM_Operation should be present");
    vm_operation()->evaluate();
    // if the process's thread is dead then the stack may already be released
    // in which case the vm_operation is no longer valid, so check for a
    // terminated process first. Can't use accessor as it resets the flag!
    DeltaProcess* p = DeltaProcess::_process_has_terminated
      ? DeltaProcess::scheduler() 
      : vm_operation()->calling_process();
    _vm_operation = NULL;
    transfer_to(p);
  }
}