VirtualBox

Changeset 82419 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 5, 2019 1:39:50 PM (5 years ago)
Author:
vboxsync
Message:

DevHDA: Disabled the HDASTREAMPERIOD::CritSect as it isn't currently needed (lock/unlock functions are no-ops). bugref:9218

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

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

    r82417 r82419  
    5252    Assert(!(pPeriod->fStatus & HDASTREAMPERIOD_F_VALID));
    5353
     54# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
    5455    int rc = RTCritSectInit(&pPeriod->CritSect);
    5556    AssertRCReturnStmt(rc, pPeriod->fStatus = 0, rc);
     57# endif
    5658    pPeriod->fStatus = HDASTREAMPERIOD_F_VALID;
    5759
     
    6870    if (pPeriod->fStatus & HDASTREAMPERIOD_F_VALID)
    6971    {
     72# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
    7073        RTCritSectDelete(&pPeriod->CritSect);
    71 
     74# endif
    7275        pPeriod->fStatus = HDASTREAMPERIOD_F_NONE;
    7376    }
     
    229232int hdaR3StreamPeriodLock(PHDASTREAMPERIOD pPeriod)
    230233{
     234# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
    231235    int rc = RTCritSectEnter(&pPeriod->CritSect);
    232236    AssertRC(rc);
    233237    return rc;
     238# else
     239    RT_NOREF(pPeriod);
     240    return VINF_SUCCESS;
     241# endif
    234242}
    235243
     
    241249void hdaR3StreamPeriodUnlock(PHDASTREAMPERIOD pPeriod)
    242250{
     251# ifdef HDA_STREAM_PERIOD_WITH_LOCKING
    243252    int rc2 = RTCritSectLeave(&pPeriod->CritSect);
    244253    AssertRC(rc2);
     254# else
     255    RT_NOREF(pPeriod);
     256# endif
    245257}
    246258
  • trunk/src/VBox/Devices/Audio/HDAStreamPeriod.h

    r82417 r82419  
    5454typedef struct HDASTREAMPERIOD
    5555{
     56#ifdef HDA_STREAM_PERIOD_WITH_LOCKING
    5657    /** Critical section for serializing access.
    5758     * @todo r=bird: This is not needed.  The stream lock is held the two places
    5859     *       this critsect is entered. */
    5960    RTCRITSECT              CritSect;
     61#endif
    6062    /** Associated HDA stream descriptor (SD) number. */
    6163    uint8_t                 u8SD;
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