Changeset 14665 in vbox
- Timestamp:
- Nov 26, 2008 10:50:00 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39975
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/BIOSSettingsImpl.cpp
r14664 r14665 710 710 void BIOSSettings::commit() 711 711 { 712 AutoWriteLock alock (this); 712 /* sanity */ 713 AutoCaller autoCaller (this); 714 AssertComRCReturnVoid (autoCaller.rc()); 715 716 /* sanity too */ 717 AutoCaller peerCaller (mPeer); 718 AssertComRCReturnVoid (peerCaller.rc()); 719 720 /* lock both for writing since we modify both (mPeer is "master" so locked 721 * first) */ 722 AutoMultiWriteLock2 alock (mPeer, this); 723 713 724 if (mData.isBackedUp()) 714 725 { … … 716 727 if (mPeer) 717 728 { 718 / / attach new data to the peer and re-share it729 /* attach new data to the peer and reshare it */ 719 730 AutoWriteLock peerlock (mPeer); 720 731 mPeer->mData.attach (mData); … … 725 736 void BIOSSettings::copyFrom (BIOSSettings *aThat) 726 737 { 727 AutoWriteLock alock (this); 728 729 // this will back up current data 738 AssertReturnVoid (aThat != NULL); 739 740 /* sanity */ 741 AutoCaller autoCaller (this); 742 AssertComRCReturnVoid (autoCaller.rc()); 743 744 /* sanity too */ 745 AutoCaller thatCaller (aThat); 746 AssertComRCReturnVoid (thatCaller.rc()); 747 748 /* peer is not modified, lock it for reading (aThat is "master" so locked 749 * first) */ 750 AutoMultiLock2 alock (aThat->rlock(), this->wlock()); 751 752 /* this will back up current data */ 730 753 mData.assignCopy (aThat->mData); 731 754 } … … 733 756 void BIOSSettings::applyDefaults (GuestOSType *aOsType) 734 757 { 735 if (!aOsType) 736 return; 758 AssertReturnVoid (aOsType != NULL); 759 760 /* sanity */ 761 AutoCaller autoCaller (this); 762 AssertComRCReturnVoid (autoCaller.rc()); 763 764 AutoWriteLock alock (this); 737 765 738 766 /* Initialize default BIOS settings here */ -
trunk/src/VBox/Main/NetworkAdapterImpl.cpp
r14664 r14665 1302 1302 void NetworkAdapter::applyDefaults (GuestOSType *aOsType) 1303 1303 { 1304 if (!aOsType) 1305 return; 1304 AssertReturnVoid (aOsType != NULL); 1305 1306 /* sanity */ 1307 AutoCaller autoCaller (this); 1308 AssertComRCReturnVoid (autoCaller.rc()); 1309 1310 AutoWriteLock alock (this); 1306 1311 1307 1312 bool e1000enabled = false; 1308 1313 #ifdef VBOX_WITH_E1000 1309 e1000enabled = true; 1314 e1000enabled = true; 1310 1315 #endif // VBOX_WITH_E1000 1311 1316
Note:
See TracChangeset
for help on using the changeset viewer.