Changeset 27774 in vbox
- Timestamp:
- Mar 29, 2010 10:44:37 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59420
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r27663 r27774 2431 2431 parent = static_cast<Medium*>(aParent); 2432 2432 2433 AutoMultiWriteLock3 alock(this, target, parent COMMA_LOCKVAL_SRC_POS);2434 2435 2433 ComObjPtr<Progress> progress; 2436 2434 HRESULT rc = S_OK; … … 2438 2436 try 2439 2437 { 2438 // locking: we need the tree lock first because we access parent pointers 2439 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 2440 // and we need to write-lock the images involved 2441 AutoMultiWriteLock3 alock(this, target, parent COMMA_LOCKVAL_SRC_POS); 2442 2440 2443 if ( target->m->state != MediumState_NotCreated 2441 2444 && target->m->state != MediumState_Created) … … 2449 2452 std::auto_ptr <ImageChain> srcChain(new ImageChain()); 2450 2453 2451 /* we walk the source tree */2452 AutoReadLock treeLock(m->pVirtualBox->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);2453 2454 for (Medium *hd = this; 2454 2455 hd; … … 2521 2522 2522 2523 if (SUCCEEDED(rc)) 2523 {2524 2524 /* return progress to the caller */ 2525 2525 progress.queryInterfaceTo(aProgress); 2526 }2527 2526 2528 2527 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.