VirtualBox

Ignore:
Timestamp:
Dec 10, 2009 5:06:44 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55876
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/AudioAdapterImpl.cpp

    r25286 r25310  
    110110    AssertComRCReturnRC(thatCaller.rc());
    111111
    112     AutoReadLock thatLock (aThat);
     112    AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS);
    113113    mData.share (aThat->mData);
    114114
     
    142142    AssertComRCReturnRC(thatCaller.rc());
    143143
    144     AutoReadLock thatLock (aThat);
     144    AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS);
    145145    mData.attachCopy (aThat->mData);
    146146
     
    180180    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    181181
    182     AutoReadLock alock(this);
     182    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    183183
    184184    *aEnabled = mData->mEnabled;
     
    196196    if (FAILED(adep.rc())) return adep.rc();
    197197
    198     AutoWriteLock alock(this);
     198    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    199199
    200200    if (mData->mEnabled != aEnabled)
     
    214214    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    215215
    216     AutoReadLock alock(this);
     216    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    217217
    218218    *aAudioDriver = mData->mAudioDriver;
     
    230230    if (FAILED(adep.rc())) return adep.rc();
    231231
    232     AutoWriteLock alock(this);
     232    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    233233
    234234    HRESULT rc = S_OK;
     
    293293    if (FAILED(autoCaller.rc())) return autoCaller.rc();
    294294
    295     AutoReadLock alock(this);
     295    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    296296
    297297    *aAudioController = mData->mAudioController;
     
    309309    if (FAILED(adep.rc())) return adep.rc();
    310310
    311     AutoWriteLock alock(this);
     311    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    312312
    313313    HRESULT rc = S_OK;
     
    366366    AssertComRCReturnRC(autoCaller.rc());
    367367
    368     AutoWriteLock alock(this);
     368    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    369369
    370370    /* Note: we assume that the default values for attributes of optional
     
    398398    AssertComRCReturnRC(autoCaller.rc());
    399399
    400     AutoReadLock alock(this);
     400    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    401401
    402402    data.fEnabled = !!mData->mEnabled;
     
    415415    AssertComRCReturn (autoCaller.rc(), false);
    416416
    417     AutoWriteLock alock(this);
     417    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    418418
    419419    bool changed = false;
     
    446446    /* lock both for writing since we modify both (mPeer is "master" so locked
    447447     * first) */
    448     AutoMultiWriteLock2 alock (mPeer, this);
     448    AutoMultiWriteLock2 alock(mPeer, this COMMA_LOCKVAL_SRC_POS);
    449449
    450450    if (mData.isBackedUp())
     
    477477    /* peer is not modified, lock it for reading (aThat is "master" so locked
    478478     * first) */
    479     AutoReadLock rl(aThat);
    480     AutoWriteLock wl(this);
     479    AutoReadLock rl(aThat COMMA_LOCKVAL_SRC_POS);
     480    AutoWriteLock wl(this COMMA_LOCKVAL_SRC_POS);
    481481
    482482    /* this will back up current data */
Note: See TracChangeset for help on using the changeset viewer.

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