third_party/virtualbox/src/VBox/VMM/VMMR3/VM.cpp
/**
 * Sets the current VM state.
 *
 * @param   pVM             The cross context VM structure.
 * @param   enmStateNew     The new state.
 * @param   enmStateOld     The old state (for asserting only).
 */
Sets the current VM state.
@param   pVM             The cross context VM structure.
@param   enmStateNew     The new state.
@param   enmStateOld     The old state (for asserting only).
Sets the current VM state . @param pVM The cross context VM structure . @param enmStateNew The new state . @param enmStateOld The old state ( for asserting only ) .
static void vmR3SetState(PVM pVM, VMSTATE enmStateNew, VMSTATE enmStateOld)
{
    PUVM pUVM = pVM->pUVM;
    RTCritSectEnter(&pUVM->vm.s.AtStateCritSect);
    RT_NOREF_PV(enmStateOld);
    AssertMsg(pVM->enmVMState == enmStateOld,
              ("%s != %s\n", VMR3GetStateName(pVM->enmVMState), VMR3GetStateName(enmStateOld)));
    vmR3SetStateLocked(pVM, pUVM, enmStateNew, pVM->enmVMState, false );
    RTCritSectLeave(&pUVM->vm.s.AtStateCritSect);
}
static void vmR3SetState ( PVM pVM , VMSTATE enmStateNew , VMSTATE enmStateOld ) { PUVM pUVM = pVM -> pUVM ; RTCritSectEnter ( & pUVM -> vm . s . AtStateCritSect ) ; RT_NOREF_PV ( enmStateOld ) ; AssertMsg ( pVM -> enmVMState == enmStateOld , ( " \n " , VMR3GetStateName ( pVM -> enmVMState ) , VMR3GetStateName ( enmStateOld ) ) ) ; vmR3SetStateLocked ( pVM , pUVM , enmStateNew , pVM -> enmVMState , false ) ; RTCritSectLeave ( & pUVM -> vm . s . AtStateCritSect ) ; }
Sets the current VM state.
Sets the current VM state .
/*fSetRatherThanClearFF*/