VirtualBox

Changeset 90612 in vbox


Ignore:
Timestamp:
Aug 10, 2021 10:21:16 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146223
Message:

VMM/PDMCritSecRw: More code refactoring. bugref:6695

File:
1 edited

Legend:

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

    r90611 r90612  
    10071007     * Okay, we have contention and will have to wait unless we're just trying.
    10081008     */
     1009    if (fTryOnly)
     1010    {
     1011        STAM_REL_COUNTER_INC(&pThis->s.CTX_MID_Z(StatContention,EnterExcl)); /** @todo different statistics for this */
     1012        return pdmCritSectRwEnterExclBailOut(pThis, VERR_SEM_BUSY);
     1013    }
     1014
    10091015    STAM_REL_COUNTER_INC(&pThis->s.CTX_MID_Z(StatContention,EnterExcl));
    1010 
    10111016#if defined(IN_RING3) || defined(IN_RING0)
    1012     if (   !fTryOnly
    10131017# ifdef IN_RING0
    1014         && RTThreadPreemptIsEnabled(NIL_RTTHREAD)
    1015         && ASMIntAreEnabled()
     1018    if (  RTThreadPreemptIsEnabled(NIL_RTTHREAD)
     1019        && ASMIntAreEnabled())
    10161020# endif
    1017        )
    10181021    {
    10191022# if defined(IN_RING3) && defined(PDMCRITSECTRW_STRICT)
     
    10291032#endif /* IN_RING3 || IN_RING0 */
    10301033
    1031 #ifdef IN_RING3
    1032     /* TryEnter call - decrement the number of (waiting) writers.  */
    1033     return pdmCritSectRwEnterExclBailOut(pThis, VERR_SEM_BUSY);
    1034 
    1035 #else
    1036 
     1034#ifndef IN_RING3
    10371035    /* We cannot call SUPSemEventWaitNoResume in this context. Go back to
    10381036       ring-3 and do it there or return rcBusy. */
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