Changeset 27592 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 22, 2010 2:19:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r27564 r27592 1586 1586 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1587 1587 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 1594 /* VirtualBox::saveSettings() needs a write lock */ 1595 AutoMultiWriteLock2 alock(m->pVirtualBox, this COMMA_LOCKVAL_SRC_POS); 1596 #endif 1588 // we access mParent and members 1589 AutoMultiWriteLock2 mlock(&m->pVirtualBox->getMediaTreeLockHandle(), this->lockHandle() COMMA_LOCKVAL_SRC_POS); 1597 1590 1598 1591 switch (m->state) … … 1610 1603 return S_OK; 1611 1604 } 1612 1613 #if 0 /** @todo temporary hack above. */1614 /* we access mParent & children() */1615 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);1616 #endif1617 1605 1618 1606 /* cannot change the type of a differencing hard disk */ … … 1653 1641 m->type = aType; 1654 1642 1655 #if 1 /** @todo remove this gross hack! Just need to get this code working again. */ 1656 alockGrossHack.leave(); 1657 #endif 1658 1659 HRESULT rc = m->pVirtualBox->saveSettings(); 1643 // saveSettings needs vbox lock 1644 ComObjPtr<VirtualBox> pVirtualBox(m->pVirtualBox); 1645 mlock.leave(); 1646 AutoWriteLock alock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS); 1647 1648 HRESULT rc = pVirtualBox->saveSettings(); 1660 1649 1661 1650 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.