VirtualBox

Changeset 38042 in vbox


Ignore:
Timestamp:
Jul 18, 2011 10:40:50 PM (13 years ago)
Author:
vboxsync
Message:

PDMCritSectEnter: Fixed rcBusy=VINF_SUCCESS case. Only affected non-strict builds, so it was kinda hard to notice, though there should've been occational VERR_SEM_BUSY gurus. Weird.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp

    r38035 r38042  
    320320VMMDECL(int) PDMCritSectEnter(PPDMCRITSECT pCritSect, int rcBusy)
    321321{
    322     int rc;
    323 #ifndef IN_RING3
    324     if (rcBusy == VINF_SUCCESS)
    325     {
    326 # ifndef PDMCRITSECT_STRICT
    327         rc = pdmCritSectEnter(pCritSect, VERR_SEM_BUSY, NULL);
    328 # else
    329         RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    330         rc = pdmCritSectEnter(pCritSect, VERR_SEM_BUSY, &SrcPos);
    331 # endif
    332     }
    333     else
    334 #endif /* !IN_RING3 */
    335     {
    336322#ifndef PDMCRITSECT_STRICT
    337         rc = pdmCritSectEnter(pCritSect, rcBusy, NULL);
    338 #else
    339         RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    340         rc = pdmCritSectEnter(pCritSect, rcBusy, &SrcPos);
    341 #endif
    342     }
    343     return rc;
     323    return pdmCritSectEnter(pCritSect, rcBusy, NULL);
     324#else
     325    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
     326    return pdmCritSectEnter(pCritSect, rcBusy, &SrcPos);
     327#endif
    344328}
    345329
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