VirtualBox

Changeset 79787 in vbox


Ignore:
Timestamp:
Jul 15, 2019 11:35:03 AM (5 years ago)
Author:
vboxsync
Message:

IPRT/lockvalidator: Better fix for problem in r132153, as there is no need to sit on the xroad thingy when yielding.

File:
1 edited

Legend:

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

    r79786 r79787  
    29052905{
    29062906    RTLOCKVALDDSTACK Stack;
     2907    rtLockValidatorSerializeDetectionEnter();
    29072908    int rc = rtLockValidatorDdDoDetection(&Stack, pRec, pThreadSelf);
     2909    rtLockValidatorSerializeDetectionLeave();
    29082910    if (RT_SUCCESS(rc))
    29092911        return VINF_SUCCESS;
     
    29132915        for (uint32_t iLoop = 0; ; iLoop++)
    29142916        {
     2917            rtLockValidatorSerializeDetectionEnter();
    29152918            rc = rtLockValidatorDdDoDetection(&Stack, pRec, pThreadSelf);
     2919            rtLockValidatorSerializeDetectionLeave();
    29162920            if (RT_SUCCESS_NP(rc))
    29172921                return VINF_SUCCESS;
     
    33733377                 || pRecU->Excl.hClass->cMsMinDeadlock > RT_INDEFINITE_WAIT))
    33743378        rc = VINF_SUCCESS;
    3375     else
    3376     {
    3377         rtLockValidatorSerializeDetectionEnter();
    3378         if (!rtLockValidatorIsSimpleNoDeadlockCase(pRecU))
    3379             rc = rtLockValidatorDeadlockDetection(pRecU, pThreadSelf, pSrcPos);
    3380         rtLockValidatorSerializeDetectionLeave();
    3381     }
     3379    else if (!rtLockValidatorIsSimpleNoDeadlockCase(pRecU))
     3380        rc = rtLockValidatorDeadlockDetection(pRecU, pThreadSelf, pSrcPos);
    33823381
    33833382    if (RT_SUCCESS(rc))
     
    36803679                 || pRec->hClass->cMsMinDeadlock > cMillies))
    36813680        rc = VINF_SUCCESS;
    3682     else
    3683     {
    3684         rtLockValidatorSerializeDetectionEnter();
    3685         if (!rtLockValidatorIsSimpleNoDeadlockCase(pRecU))
    3686             rc = rtLockValidatorDeadlockDetection(pRecU, pThreadSelf, pSrcPos);
    3687         rtLockValidatorSerializeDetectionLeave();
    3688     }
     3681    else if (!rtLockValidatorIsSimpleNoDeadlockCase(pRecU))
     3682        rc = rtLockValidatorDeadlockDetection(pRecU, pThreadSelf, pSrcPos);
    36893683
    36903684    if (RT_SUCCESS(rc))
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