VirtualBox

Changeset 25238 in vbox


Ignore:
Timestamp:
Dec 8, 2009 12:55:17 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55752
Message:

VM.cpp: -Wshadow and fixed a vmR3TrySetState call.

File:
1 edited

Legend:

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

    r25075 r25238  
    19881988    if (pVCpu->idCpu == pVM->cCpus - 1)
    19891989    {
    1990         int rc = vmR3TrySetState(pVM, "VMR3PowerOff", 10,
    1991                                  VMSTATE_POWERING_OFF,    VMSTATE_RUNNING,
    1992                                  VMSTATE_POWERING_OFF,    VMSTATE_SUSPENDED,
    1993                                  VMSTATE_POWERING_OFF,    VMSTATE_DEBUGGING,
    1994                                  VMSTATE_POWERING_OFF,    VMSTATE_LOAD_FAILURE,
    1995                                  VMSTATE_POWERING_OFF,    VMSTATE_GURU_MEDITATION,
    1996                                  VMSTATE_POWERING_OFF,    VMSTATE_FATAL_ERROR,
    1997                                  VMSTATE_POWERING_OFF,    VMSTATE_CREATED, /** @todo update the diagram! */
    1998                                  VMSTATE_POWERING_OFF_LS, VMSTATE_RUNNING_LS,
    1999                                  VMSTATE_POWERING_OFF_LS, VMSTATE_DEBUGGING_LS,
    2000                                  VMSTATE_POWERING_OFF_LS, VMSTATE_GURU_MEDITATION_LS,
    2001                                  VMSTATE_POWERING_OFF_LS, VMSTATE_FATAL_ERROR_LS);
     1990        int rc = vmR3TrySetState(pVM, "VMR3PowerOff", 11,
     1991                                 VMSTATE_POWERING_OFF,    VMSTATE_RUNNING,           /* 1 */
     1992                                 VMSTATE_POWERING_OFF,    VMSTATE_SUSPENDED,         /* 2 */
     1993                                 VMSTATE_POWERING_OFF,    VMSTATE_DEBUGGING,         /* 3 */
     1994                                 VMSTATE_POWERING_OFF,    VMSTATE_LOAD_FAILURE,      /* 4 */
     1995                                 VMSTATE_POWERING_OFF,    VMSTATE_GURU_MEDITATION,   /* 5 */
     1996                                 VMSTATE_POWERING_OFF,    VMSTATE_FATAL_ERROR,       /* 6 */
     1997                                 VMSTATE_POWERING_OFF,    VMSTATE_CREATED,           /* 7 */   /** @todo update the diagram! */
     1998                                 VMSTATE_POWERING_OFF_LS, VMSTATE_RUNNING_LS,        /* 8 */
     1999                                 VMSTATE_POWERING_OFF_LS, VMSTATE_DEBUGGING_LS,      /* 9 */
     2000                                 VMSTATE_POWERING_OFF_LS, VMSTATE_GURU_MEDITATION_LS,/* 10 */
     2001                                 VMSTATE_POWERING_OFF_LS, VMSTATE_FATAL_ERROR_LS);   /* 11 */
    20022002        if (RT_FAILURE(rc))
    20032003            return rc;
     
    20282028        {
    20292029            /** @todo SMP support? */
    2030             PVMCPU pVCpu = VMMGetCpu(pVM);
    2031 
    20322030            /** @todo make the state dumping at VMR3PowerOff optional. */
    20332031            RTLogRelPrintf("****************** Guest state at power off ******************\n");
     
    21982196        for (VMCPUID idCpu = 1; idCpu < pVM->cCpus; idCpu++)
    21992197        {
    2200             int rc = VMR3ReqCallWaitU(pUVM, idCpu, (PFNRT)vmR3Destroy, 1, pVM);
     2198            rc = VMR3ReqCallWaitU(pUVM, idCpu, (PFNRT)vmR3Destroy, 1, pVM);
    22012199            AssertLogRelRC(rc);
    22022200        }
     
    22052203    {
    22062204        /* vmR3Destroy on all EMTs, ending with EMT(0). */
    2207         int rc = VMR3ReqCallWaitU(pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Destroy, 1, pVM);
     2205        rc = VMR3ReqCallWaitU(pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Destroy, 1, pVM);
    22082206        AssertLogRelRC(rc);
    22092207
     
    24342432    for (unsigned i = 0; i < 10; i++)
    24352433    {
    2436         PVMREQ pReqHead = (PVMREQ)ASMAtomicXchgPtr((void *volatile *)&pUVM->vm.s.pReqs, NULL);
     2434        PVMREQ pReqHead = (PVMREQ)ASMAtomicXchgPtr((void * volatile *)&pUVM->vm.s.pReqs, NULL);
    24372435        AssertMsg(!pReqHead, ("This isn't supposed to happen! VMR3Destroy caller has to serialize this.\n"));
    24382436        if (!pReqHead)
     
    24532451     * Now all queued VCPU requests (again, there shouldn't be any).
    24542452     */
    2455     for (VMCPUID i = 0; i < pUVM->cCpus; i++)
    2456     {
    2457         PUVMCPU pUVCpu = &pUVM->aCpus[i];
     2453    for (VMCPUID idCpu = 0; idCpu < pUVM->cCpus; idCpu++)
     2454    {
     2455        PUVMCPU pUVCpu = &pUVM->aCpus[idCpu];
    24582456
    24592457        for (unsigned i = 0; i < 10; i++)
    24602458        {
    2461             PVMREQ pReqHead = (PVMREQ)ASMAtomicXchgPtr((void *volatile *)&pUVCpu->vm.s.pReqs, NULL);
     2459            PVMREQ pReqHead = (PVMREQ)ASMAtomicXchgPtr((void * volatile *)&pUVCpu->vm.s.pReqs, NULL);
    24622460            AssertMsg(!pReqHead, ("This isn't supposed to happen! VMR3Destroy caller has to serialize this.\n"));
    24632461            if (!pReqHead)
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