VirtualBox

Changeset 90445 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Jul 30, 2021 10:18:24 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146049
Message:

Dev*: Check PDMDevHlpCritSectEnter return status better. bugref:6695

Location:
trunk/src/VBox/Devices/Storage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r90209 r90445  
    897897{
    898898    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    899     AssertRC(rc);
     899    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    900900
    901901    pCtl->AsyncIOReqHead = 0;
     
    910910{
    911911    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    912     AssertRC(rc);
     912    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    913913
    914914    uint8_t const iAsyncIORequest = pCtl->AsyncIOReqHead % RT_ELEMENTS(pCtl->aAsyncIORequests);
     
    935935
    936936    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    937     AssertRC(rc);
     937    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    938938
    939939    if (pCtl->AsyncIOReqHead != pCtl->AsyncIOReqTail)
     
    960960{
    961961    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    962     AssertRC(rc);
     962    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    963963
    964964    if (pCtl->AsyncIOReqHead != pCtl->AsyncIOReqTail && pCtl->aAsyncIORequests[pCtl->AsyncIOReqTail].ReqType == ReqType)
     
    984984{
    985985    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    986     AssertRC(rc);
     986    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    987987
    988988    LogRel(("PIIX3 ATA: Ctl#%d: request queue dump (topmost is current):\n", pCtl->iCtl));
     
    10381038{
    10391039    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    1040     AssertRC(rc);
     1040    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    10411041
    10421042    bool fIdle = pCtl->fRedoIdle;
     
    12681268{
    12691269    STAM_PROFILE_START(&pCtl->StatLockWait, a);
    1270     PDMDevHlpCritSectEnter(pDevIns, &pCtl->lock, VINF_SUCCESS);
     1270    int const rcLock = PDMDevHlpCritSectEnter(pDevIns, &pCtl->lock, VINF_SUCCESS);
     1271    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->lock, rcLock);
    12711272    STAM_PROFILE_STOP(&pCtl->StatLockWait, a);
    12721273}
     
    57665767     */
    57675768    int rc = PDMDevHlpCritSectEnter(pDevIns, &pCtl->AsyncIORequestLock, VINF_SUCCESS);
    5768     AssertRC(rc);
     5769    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pCtl->AsyncIORequestLock, rc);
    57695770
    57705771    if (    pCtlR3->fSignalIdle
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r89266 r90445  
    13751375
    13761376    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSectIntr, VINF_SUCCESS);
    1377     AssertRC(rc);
     1377    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->CritSectIntr, rc);
    13781378
    13791379    RTGCPHYS GCPhysAddrMailboxIncoming = pThis->GCPhysAddrMailboxIncomingBase
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r89196 r90445  
    729729static void lsilogicR3FinishContextReply(PPDMDEVINS pDevIns, PLSILOGICSCSI pThis, uint32_t u32MessageContext)
    730730{
    731     int rc;
    732 
    733731    LogFlowFunc(("pThis=%#p u32MessageContext=%#x\n", pThis, u32MessageContext));
    734732
     
    736734
    737735    /* Write message context ID into reply post queue. */
    738     rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->ReplyPostQueueCritSect, VINF_SUCCESS);
    739     AssertRC(rc);
     736    int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->ReplyPostQueueCritSect, VINF_SUCCESS);
     737    PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->ReplyPostQueueCritSect, rc);
    740738
    741739    /* Check for a entry in the queue. */
     
    792790         */
    793791# ifdef IN_RING3
    794         int rc;
    795792        /* Grab a free reply message from the queue. */
    796         rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->ReplyFreeQueueCritSect, VINF_SUCCESS);
    797         AssertRC(rc);
     793        int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->ReplyFreeQueueCritSect, VINF_SUCCESS);
     794        PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->ReplyFreeQueueCritSect, rc);
    798795
    799796        /* Check for a free reply frame. */
     
    822819        /* Write low 32bits of reply frame into post reply queue. */
    823820        rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->ReplyPostQueueCritSect, VINF_SUCCESS);
    824         AssertRC(rc);
     821        PDM_CRITSECT_RELEASE_ASSERT_RC_DEV(pDevIns, &pThis->ReplyPostQueueCritSect, rc);
    825822
    826823        /* Check for a entry in the queue. */
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