VirtualBox

Changeset 89282 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
May 25, 2021 8:11:23 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144628
Message:

DrvAudio: A couple of fixes related to multi-threading. bugref:9890

File:
1 edited

Legend:

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

    r89258 r89282  
    22132213                Assert(pStreamEx->cRefs >= 2);
    22142214                int rc2 = RTReqCancel(pStreamEx->hReqInitAsync);
     2215
     2216                RTReqRelease(pStreamEx->hReqInitAsync);
     2217                pStreamEx->hReqInitAsync = NIL_RTREQ;
     2218
     2219                RTCritSectLeave(&pStreamEx->Core.CritSect); /* (exit before releasing the stream to avoid assertion) */
     2220
    22152221                if (RT_SUCCESS(rc2))
    22162222                {
     
    22252231                    Assert(rc2 == VERR_RT_REQUEST_STATE);
    22262232                }
    2227 
    2228                 RTReqRelease(pStreamEx->hReqInitAsync);
    2229                 pStreamEx->hReqInitAsync = NIL_RTREQ;
    22302233            }
    2231 
    2232             RTCritSectLeave(&pStreamEx->Core.CritSect);
     2234            else
     2235                RTCritSectLeave(&pStreamEx->Core.CritSect);
    22332236
    22342237            /*
     
    41314134    AssertRCReturn(rc, rc);
    41324135
    4133     AssertPtr(pThis->hReqPool != NIL_RTREQPOOL);
     4136    Assert(pThis->hReqPool != NIL_RTREQPOOL);
    41344137    AssertPtr(pThis->pHostDrvAudio);
    41354138    if (   pThis->hReqPool != NIL_RTREQPOOL
    41364139        && pThis->pHostDrvAudio != NULL)
    41374140    {
    4138         Assert(pThis->pHostDrvAudio->pfnDoOnWorkerThread);
     4141        AssertPtr(pThis->pHostDrvAudio->pfnDoOnWorkerThread);
    41394142        if (pThis->pHostDrvAudio->pfnDoOnWorkerThread)
    41404143        {
     
    41504153            else
    41514154            {
    4152 
    41534155                uint32_t cRefs = drvAudioStreamRetainInternal(pStreamEx);
    41544156                if (cRefs != UINT32_MAX)
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