VirtualBox

Changeset 8794 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 13, 2008 5:43:23 PM (17 years ago)
Author:
vboxsync
Message:

started on some state machine validation (to catch a bad OFF -> GURU transition).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VM.cpp

    r8608 r8794  
    22572257void vmR3SetState(PVM pVM, VMSTATE enmStateNew)
    22582258{
     2259    /*
     2260     * Validate state machine transitions before doing the actual change.
     2261     */
    22592262    VMSTATE enmStateOld = pVM->enmVMState;
     2263    switch (enmStateOld)
     2264    {
     2265        case VMSTATE_OFF:
     2266            Assert(enmStateNew != VMSTATE_GURU_MEDITATION);
     2267            break;
     2268
     2269        default:
     2270            /** @todo full validation. */
     2271            break;
     2272    }
     2273
    22602274    pVM->enmVMState = enmStateNew;
    22612275    LogRel(("Changing the VM state from '%s' to '%s'.\n", VMR3GetStateName(enmStateOld),  VMR3GetStateName(enmStateNew)));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette