Changeset 38729 in vbox
- Timestamp:
- Sep 13, 2011 9:50:58 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73997
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r38717 r38729 3419 3419 // request the host lock first, since might be calling Host methods for getting host drives; 3420 3420 // next, protect the media tree all the while we're in here, as well as our member variables 3421 AutoMultiWriteLock2 alock(mParent->host()->lockHandle(), 3422 this->lockHandle() COMMA_LOCKVAL_SRC_POS); 3421 AutoMultiWriteLock2 alock(mParent->host(), this COMMA_LOCKVAL_SRC_POS); 3423 3422 AutoWriteLock treeLock(&mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 3424 3423 … … 9300 9299 AssertComRCReturn(autoCaller.rc(), autoCaller.rc()); 9301 9300 9302 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 9301 AutoMultiWriteLock2 alock(this->lockHandle(), 9302 &mParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 9303 9303 9304 9304 /* must be in a protective state because we leave the lock below */ … … 9442 9442 } 9443 9443 9444 /* leave the lock before the potentially lengthy operation */9445 alock. leave();9444 /* leave the locks before the potentially lengthy operation */ 9445 alock.release(); 9446 9446 rc = pMedium->createDiffStorage(diff, MediumVariant_Standard, 9447 9447 pMediumLockList, … … 9449 9449 true /* aWait */, 9450 9450 pllRegistriesThatNeedSaving); 9451 alock. enter();9451 alock.acquire(); 9452 9452 if (FAILED(rc)) throw rc; 9453 9453 … … 11481 11481 /* Creating a Progress object requires the VirtualBox lock, and 11482 11482 * thus locking it here is required by the lock order rules. */ 11483 AutoMultiWriteLock2 alock(mParent ->lockHandle(), this->lockHandle()COMMA_LOCKVAL_SRC_POS);11483 AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS); 11484 11484 11485 11485 if (control == mData->mSession.mDirectControl) -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r38717 r38729 2529 2529 2530 2530 // locking: we need the tree lock first because we access parent pointers 2531 Auto ReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);2532 AutoMultiWriteLock2 alock(this, diffCOMMA_LOCKVAL_SRC_POS);2531 AutoMultiWriteLock3 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 2532 this->lockHandle(), diff->lockHandle() COMMA_LOCKVAL_SRC_POS); 2533 2533 2534 2534 if (m->type == MediumType_Writethrough) … … 2573 2573 } 2574 2574 2575 treeLock.release();2576 2575 alock.release(); 2577 2576
Note:
See TracChangeset
for help on using the changeset viewer.