Changeset 31327 in vbox
- Timestamp:
- Aug 3, 2010 10:34:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r31296 r31327 159 159 usbListsLock(LOCKCLASS_USBLIST), 160 160 #endif 161 drivesLock(LOCKCLASS_LISTOFMEDIA), 161 162 fDVDDrivesListBuilt(false), 162 163 fFloppyDrivesListBuilt(false) … … 176 177 177 178 // list of host drives; lazily created by getDVDDrives() and getFloppyDrives() 179 WriteLockHandle drivesLock; // protects the below two lists and the bools 178 180 MediaList llDVDDrives, 179 181 llFloppyDrives; … … 416 418 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 417 419 418 AutoWriteLock alock( thisCOMMA_LOCKVAL_SRC_POS);420 AutoWriteLock alock(m->drivesLock COMMA_LOCKVAL_SRC_POS); 419 421 420 422 MediaList *pList; … … 442 444 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 443 445 444 AutoWriteLock alock( thisCOMMA_LOCKVAL_SRC_POS);446 AutoWriteLock alock(m->drivesLock COMMA_LOCKVAL_SRC_POS); 445 447 446 448 MediaList *pList; … … 1527 1529 * that may have changed if fRefresh == true. 1528 1530 * 1529 * The caller must hold the Hostwrite lock before calling this.1531 * The caller must hold the m->drivesLock write lock before calling this. 1530 1532 * To protect the list to which the caller's pointer points, the caller 1531 * must also hold th e Host lock.1533 * must also hold that lock. 1532 1534 * 1533 1535 * @param mediumType Must be DeviceType_Floppy or DeviceType_DVD. … … 1541 1543 { 1542 1544 HRESULT rc = S_OK; 1543 Assert( isWriteLockOnCurrentThread());1545 Assert(m->drivesLock.isWriteLockOnCurrentThread()); 1544 1546 1545 1547 MediaList llNew; … … 1650 1652 * and looks for a host drive with the given UUID. If found, it sets pMedium 1651 1653 * to that drive; otherwise returns VBOX_E_OBJECT_NOT_FOUND. 1654 * 1652 1655 * @param mediumType Must be DeviceType_DVD or DeviceType_Floppy. 1653 1656 * @param uuid Medium UUID of host drive to look for. … … 1663 1666 MediaList *pllMedia; 1664 1667 1665 AutoWriteLock wlock( thisCOMMA_LOCKVAL_SRC_POS);1668 AutoWriteLock wlock(m->drivesLock COMMA_LOCKVAL_SRC_POS); 1666 1669 HRESULT rc = getDrives(mediumType, fRefresh, pllMedia); 1667 1670 if (SUCCEEDED(rc)) … … 1692 1695 HRESULT rc = S_OK; 1693 1696 1694 Assert( isWriteLockOnCurrentThread());1697 Assert(m->drivesLock.isWriteLockOnCurrentThread()); 1695 1698 1696 1699 try … … 1809 1812 HRESULT rc = S_OK; 1810 1813 1811 Assert( isWriteLockOnCurrentThread());1814 Assert(m->drivesLock.isWriteLockOnCurrentThread()); 1812 1815 1813 1816 try
Note:
See TracChangeset
for help on using the changeset viewer.