VirtualBox

Ignore:
Timestamp:
Dec 10, 2009 5:06:44 PM (15 years ago)
Author:
vboxsync
Message:

Main: lock validator, first batch: implement per-thread stack to trace locking (disabled by default, use VBOX_WITH_LOCK_VALIDATOR, but that WILL FAIL presently)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/SystemPropertiesImpl.cpp

    r25149 r25310  
    543543    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    544544
    545     AutoReadLock alock(this);
     545    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    546546
    547547    m_strDefaultMachineFolderFull.cloneTo(aDefaultMachineFolder);
     
    556556
    557557    /* VirtualBox::saveSettings() needs a write lock */
    558     AutoMultiWriteLock2 alock (mParent, this);
     558    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    559559
    560560    HRESULT rc = setDefaultMachineFolder (aDefaultMachineFolder);
     
    572572    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    573573
    574     AutoReadLock alock(this);
     574    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    575575
    576576    m_strDefaultHardDiskFolderFull.cloneTo(aDefaultHardDiskFolder);
     
    585585
    586586    /* VirtualBox::saveSettings() needs a write lock */
    587     AutoMultiWriteLock2 alock (mParent, this);
     587    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    588588
    589589    HRESULT rc = setDefaultHardDiskFolder (aDefaultHardDiskFolder);
     
    603603    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    604604
    605     AutoReadLock alock(this);
     605    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    606606
    607607    SafeIfaceArray<IMediumFormat> mediumFormats (mMediumFormats);
     
    618618    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    619619
    620     AutoReadLock alock(this);
     620    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    621621
    622622    m_strDefaultHardDiskFormat.cloneTo(aDefaultHardDiskFormat);
     
    631631
    632632    /* VirtualBox::saveSettings() needs a write lock */
    633     AutoMultiWriteLock2 alock (mParent, this);
     633    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    634634
    635635    HRESULT rc = setDefaultHardDiskFormat (aDefaultHardDiskFormat);
     
    647647    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    648648
    649     AutoReadLock alock(this);
     649    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    650650
    651651    m_strRemoteDisplayAuthLibrary.cloneTo(aRemoteDisplayAuthLibrary);
     
    660660
    661661    /* VirtualBox::saveSettings() needs a write lock */
    662     AutoMultiWriteLock2 alock (mParent, this);
     662    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    663663
    664664    HRESULT rc = setRemoteDisplayAuthLibrary (aRemoteDisplayAuthLibrary);
     
    676676    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    677677
    678     AutoReadLock alock(this);
     678    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    679679
    680680    m_strWebServiceAuthLibrary.cloneTo(aWebServiceAuthLibrary);
     
    689689
    690690    /* VirtualBox::saveSettings() needs a write lock */
    691     AutoMultiWriteLock2 alock (mParent, this);
     691    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    692692
    693693    HRESULT rc = setWebServiceAuthLibrary (aWebServiceAuthLibrary);
     
    706706    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    707707
    708     AutoReadLock alock(this);
     708    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    709709
    710710    *count = mLogHistoryCount;
     
    719719
    720720    /* VirtualBox::saveSettings() needs a write lock */
    721     AutoMultiWriteLock2 alock (mParent, this);
     721    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
    722722
    723723    mLogHistoryCount = count;
     
    736736    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    737737
    738     AutoReadLock alock(this);
     738    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    739739
    740740    *aAudioDriver = mDefaultAudioDriver;
     
    751751    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    752752
    753     AutoWriteLock alock(this);
     753    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    754754
    755755    HRESULT rc = S_OK;
     
    780780    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    781781
    782     AutoReadLock alock(this);
     782    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    783783
    784784    data.strDefaultMachineFolder = m_strDefaultMachineFolder;
     
    807807    AssertComRCReturn (autoCaller.rc(), format);
    808808
    809     AutoReadLock alock(this);
     809    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    810810
    811811    for (MediumFormatList::const_iterator it = mMediumFormats.begin();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette