VirtualBox

Changeset 25791 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jan 12, 2010 10:57:57 PM (15 years ago)
Author:
vboxsync
Message:

iprt/lockvalidator,tstRTLockValidator: Fixed some class reference counting bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/lockvalidator.cpp

    r25748 r25791  
    13471347                    {
    13481348                        pChunk->aRefs[i].fAutodidacticism = fAutodidacticism;
     1349                        rtLockValidatorClassRetain(pPriorClass);
    13491350                        rc = VINF_SUCCESS;
    13501351                        break;
     
    13781379
    13791380                    ASMAtomicWritePtr((void * volatile *)&pChunk->pNext, pNew);
     1381                    rtLockValidatorClassRetain(pPriorClass);
    13801382                    rc = VINF_SUCCESS;
    13811383                    break;
     
    33743376
    33753377    ASMAtomicWriteU32(&pRec->Core.u32Magic, RTLOCKVALRECSHRD_MAGIC_DEAD);
    3376     ASMAtomicUoWriteHandle(&pRec->hClass, NIL_RTLOCKVALCLASS);
     3378    RTLOCKVALCLASS hClass;
     3379    ASMAtomicXchgHandle(&pRec->hClass, NIL_RTLOCKVALCLASS, &hClass);
    33773380    if (pRec->papOwners)
    33783381    {
     
    33883391
    33893392    rtLockValidatorSerializeDestructLeave();
     3393
     3394    if (hClass != NIL_RTLOCKVALCLASS)
     3395        RTLockValidatorClassRelease(hClass);
    33903396}
    33913397
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