VirtualBox

Changeset 90331 in vbox


Ignore:
Timestamp:
Jul 26, 2021 12:53:55 PM (4 years ago)
Author:
vboxsync
Message:

DevHda: Use PDMCritSect API via PDMDevHlp. bugref:10074

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHda.cpp

    r90158 r90331  
    16051605
    16061606        STAM_REL_PROFILE_START_NS(&pStreamR3->State.StatReset, a);
    1607         Assert(PDMCritSectIsOwner(&pThis->CritSect));
     1607        Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    16081608        PAUDMIXSINK const pMixSink = pStreamR3->pMixSink ? pStreamR3->pMixSink->pMixSink : NULL;
    16091609        if (pMixSink)
     
    16351635            LogFunc(("[SD%RU8] State changed (fRun=%RTbool)\n", uSD, fRun));
    16361636
    1637             Assert(PDMCritSectIsOwner(&pThis->CritSect));
     1637            Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    16381638            /** @todo bird: It's not clear to me when the pMixSink is actually
    16391639             *        assigned to the stream, so being paranoid till I find out... */
     
    27762776{
    27772777    PHDASTATER3 pThisCC = RT_FROM_MEMBER(pCodec, HDASTATER3, Codec);
    2778     PHDASTATE   pThis   = PDMDEVINS_2_DATA(pThisCC->pDevIns, PHDASTATE);
     2778    PPDMDEVINS  pDevIns = pThisCC->pDevIns;
     2779    PHDASTATE   pThis   = PDMDEVINS_2_DATA(pDevIns, PHDASTATE);
    27792780    LogFunc(("enmMixerCtl=%s, uSD=%RU8, uChannel=%RU8\n", PDMAudioMixerCtlGetName(enmMixerCtl), uSD, uChannel));
    27802781
     
    28262827            LogFunc(("Sink '%s' was assigned to stream #%RU8 (channel %RU8) before\n",
    28272828                     pSink->pMixSink->pszName, pOldStreamShared->u8SD, pOldStreamShared->u8Channel));
    2828             Assert(PDMCritSectIsOwner(&pThis->CritSect));
     2829            Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    28292830
    28302831            /* Only disable the stream if the stream descriptor # has changed. */
     
    28542855            PHDASTREAMR3 pStreamR3     = &pThisCC->aStreams[uSD];
    28552856            PHDASTREAM   pStreamShared = &pThis->aStreams[uSD];
    2856             Assert(PDMCritSectIsOwner(&pThis->CritSect));
     2857            Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    28572858
    28582859            pSink->pStreamR3     = pStreamR3;
     
    29382939{
    29392940    LogFlowFuncEnter();
    2940     Assert(PDMCritSectIsOwner(&pThis->CritSect));
     2941    Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect));
    29412942
    29422943    /*
     
    47514752    PHDASTATER3 pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PHDASTATER3);
    47524753
    4753     if (PDMCritSectIsInitialized(&pThis->CritSect))
    4754         PDMCritSectEnter(&pThis->CritSect, VERR_IGNORED);
     4754    if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->CritSect))
     4755        PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);
    47554756
    47564757    PHDADRIVER pDrv;
     
    47754776    }
    47764777
    4777     if (PDMCritSectIsInitialized(&pThis->CritSect))
    4778     {
    4779         PDMCritSectLeave(&pThis->CritSect);
    4780         PDMR3CritSectDelete(&pThis->CritSect);
     4778    if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->CritSect))
     4779    {
     4780        PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect);
     4781        PDMDevHlpCritSectDelete(pDevIns, &pThis->CritSect);
    47814782    }
    47824783    return VINF_SUCCESS;
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