Changeset 38741 in vbox
- Timestamp:
- Sep 13, 2011 2:47:57 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 74012
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r38729 r38741 2647 2647 { 2648 2648 // locking: we need the tree lock first because we access parent pointers 2649 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);2650 2649 // and we need to write-lock the media involved 2651 AutoMultiWriteLock3 alock(this, pTarget, pParent COMMA_LOCKVAL_SRC_POS); 2650 AutoMultiWriteLock4 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 2651 this->lockHandle(), 2652 pTarget->lockHandle(), 2653 pParent->LockHandle() COMMA_LOCKVAL_SRC_POS); 2652 2654 2653 2655 if ( pTarget->m->state != MediumState_NotCreated … … 4398 4400 { 4399 4401 // locking: we need the tree lock first because we access parent pointers 4400 Auto ReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);4402 AutoWriteLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 4401 4403 4402 4404 /* more sanity checking and figuring out the merge direction */ … … 4977 4979 { 4978 4980 // locking: we need the tree lock first because we access parent pointers 4979 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);4980 4981 // and we need to write-lock the media involved 4981 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 4982 AutoMultiWriteLock2 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 4983 this->lockHandle() COMMA_LOCKVAL_SRC_POS); 4982 4984 4983 4985 /* Build the source lock list. */ … … 5056 5058 { 5057 5059 // locking: we need the tree lock first because we access parent pointers 5058 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);5059 5060 // and we need to write-lock the media involved 5060 AutoMultiWriteLock2 alock(this, aParent COMMA_LOCKVAL_SRC_POS); 5061 AutoMultiWriteLock3 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 5062 this->lockHandle(), 5063 aParent->lockHandle() COMMA_LOCKVAL_SRC_POS); 5061 5064 5062 5065 if ( m->state != MediumState_NotCreated … … 5143 5146 { 5144 5147 // locking: we need the tree lock first because we access parent pointers 5145 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);5146 5148 // and we need to write-lock the media involved 5147 AutoMultiWriteLock3 alock(this, aTarget, aParent COMMA_LOCKVAL_SRC_POS); 5149 AutoMultiWriteLock4 alock(&m->pVirtualBox->getMediaTreeLockHandle(), 5150 this->lockHandle(), 5151 aTarget->lockHandle(), 5152 aParent->lockHandle() COMMA_LOCKVAL_SRC_POS); 5148 5153 5149 5154 if ( aTarget->m->state != MediumState_NotCreated
Note:
See TracChangeset
for help on using the changeset viewer.