VirtualBox

Changeset 27564 in vbox for trunk/src


Ignore:
Timestamp:
Mar 21, 2010 11:03:46 PM (15 years ago)
Author:
vboxsync
Message:

MediumImpl.cpp: Committed a temporary hack for the deadlock in Medium::COMSETTER(Type) while waiting for it to be fixed properly in the context of #4201.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumImpl.cpp

    r27392 r27564  
    15861586    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    15871587
     1588#if 1 /** @todo Temporarily hacked so that it won't trigger lock validator errors
     1589       *        and deadlock. */
     1590    /* VirtualBox::saveSettings() needs a write lock and we access mParent & children() */
     1591    AutoWriteLock alock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
     1592    AutoMultiWriteLock2 alockGrossHack(&m->pVirtualBox->getMediaTreeLockHandle(), this->lockHandle() COMMA_LOCKVAL_SRC_POS);
     1593#else
    15881594    /* VirtualBox::saveSettings() needs a write lock */
    15891595    AutoMultiWriteLock2 alock(m->pVirtualBox, this COMMA_LOCKVAL_SRC_POS);
     1596#endif
    15901597
    15911598    switch (m->state)
     
    16041611    }
    16051612
     1613#if 0 /** @todo temporary hack above. */
    16061614    /* we access mParent & children() */
    16071615    AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
     1616#endif
    16081617
    16091618    /* cannot change the type of a differencing hard disk */
     
    16431652
    16441653    m->type = aType;
     1654
     1655#if 1 /** @todo remove this gross hack! Just need to get this code working again. */
     1656    alockGrossHack.leave();
     1657#endif
    16451658
    16461659    HRESULT rc = m->pVirtualBox->saveSettings();
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