VirtualBox

Changeset 23668 in vbox for trunk/src


Ignore:
Timestamp:
Oct 10, 2009 3:01:18 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53381
Message:

VMM: Live migration fixes.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r23649 r23668  
    20662066
    20672067    if (pStrm->hIoThread != NIL_RTTHREAD)
    2068     {
    20692068        ASMAtomicWriteBool(&pStrm->fTerminating, true);
    2070         int rc2 = RTSemEventSignal(pStrm->fWrite ? pStrm->hEvtHead : pStrm->hEvtFree); AssertLogRelRC(rc2);
    2071         int rc3 = RTThreadWait(pStrm->hIoThread, RT_INDEFINITE_WAIT, NULL);            AssertLogRelRC(rc3);
     2069
     2070    int rc;
     2071    if (pStrm->fWrite)
     2072    {
     2073        int rc2 = RTSemEventSignal(pStrm->hEvtHead);                            AssertLogRelRC(rc2);
     2074        int rc3 = RTThreadWait(pStrm->hIoThread, RT_INDEFINITE_WAIT, NULL);     AssertLogRelRC(rc3);
    20722075        pStrm->hIoThread = NIL_RTTHREAD;
    2073     }
    2074 
    2075     int rc = pStrm->pOps->pfnClose(pStrm->pvUser);
    2076     if (RT_FAILURE(rc))
    2077         ssmR3StrmSetError(pStrm, rc);
     2076
     2077        rc = pStrm->pOps->pfnClose(pStrm->pvUser);
     2078        if (RT_FAILURE(rc))
     2079            ssmR3StrmSetError(pStrm, rc);
     2080    }
     2081    else
     2082    {
     2083        rc = pStrm->pOps->pfnClose(pStrm->pvUser);
     2084        if (RT_FAILURE(rc))
     2085            ssmR3StrmSetError(pStrm, rc);
     2086
     2087        int rc2 = RTSemEventSignal(pStrm->hEvtFree);                            AssertLogRelRC(rc2);
     2088        int rc3 = RTThreadWait(pStrm->hIoThread, RT_INDEFINITE_WAIT, NULL);     AssertLogRelRC(rc3);
     2089        pStrm->hIoThread = NIL_RTTHREAD;
     2090    }
     2091
    20782092    pStrm->pOps   = NULL;
    20792093    pStrm->pvUser = NULL;
     
    36123626    VM_ASSERT_EMT0(pVM);
    36133627    AssertMsgReturn(   pSSM->enmAfter == SSMAFTER_DESTROY
    3614                     || pSSM->enmAfter == SSMAFTER_CONTINUE,
     3628                    || pSSM->enmAfter == SSMAFTER_CONTINUE
     3629                    || pSSM->enmAfter == SSMAFTER_MIGRATE,
    36153630                    ("%d\n", pSSM->enmAfter),
    36163631                    VERR_INVALID_PARAMETER);
     
    40544069    VM_ASSERT_EMT0(pVM);
    40554070    AssertMsgReturn(   pSSM->enmAfter == SSMAFTER_DESTROY
    4056                     || pSSM->enmAfter == SSMAFTER_CONTINUE,
     4071                    || pSSM->enmAfter == SSMAFTER_CONTINUE
     4072                    || pSSM->enmAfter == SSMAFTER_MIGRATE,
    40574073                    ("%d\n", pSSM->enmAfter),
    40584074                    VERR_INVALID_PARAMETER);
     
    44444460    VM_ASSERT_OTHER_THREAD(pVM);
    44454461    AssertMsgReturn(   pSSM->enmAfter == SSMAFTER_DESTROY
    4446                     || pSSM->enmAfter == SSMAFTER_CONTINUE,
     4462                    || pSSM->enmAfter == SSMAFTER_CONTINUE
     4463                    || pSSM->enmAfter == SSMAFTER_MIGRATE,
    44474464                    ("%d\n", pSSM->enmAfter),
    44484465                    VERR_INVALID_PARAMETER);
     
    46444661     */
    46454662    AssertMsgReturn(   enmAfter == SSMAFTER_DESTROY
    4646                     || enmAfter == SSMAFTER_CONTINUE,
     4663                    || enmAfter == SSMAFTER_CONTINUE
     4664                    || enmAfter == SSMAFTER_MIGRATE,
    46474665                    ("%d\n", enmAfter),
    46484666                    VERR_INVALID_PARAMETER);
  • trunk/src/VBox/VMM/VM.cpp

    r23598 r23668  
    15871587     * Validate input.
    15881588     */
    1589     AssertPtr(pszFilename);
     1589    AssertPtrNull(pszFilename);
     1590    AssertPtrNull(pStreamOps);
    15901591    AssertPtr(pVM);
    1591     Assert(enmAfter == SSMAFTER_DESTROY || enmAfter == SSMAFTER_CONTINUE);
     1592    Assert(   enmAfter == SSMAFTER_DESTROY
     1593           || enmAfter == SSMAFTER_CONTINUE
     1594           || enmAfter == SSMAFTER_MIGRATE);
    15921595    AssertPtr(ppSSM);
    15931596    *ppSSM = NULL;
Note: See TracChangeset for help on using the changeset viewer.

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