Changeset 90447 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jul 31, 2021 12:44:13 AM (3 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHda.cpp
r90331 r90447 83 83 #define DEVHDA_LOCK(a_pDevIns, a_pThis) \ 84 84 do { \ 85 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \86 AssertRC(rcLock); \85 int const rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \ 86 PDM_CRITSECT_RELEASE_ASSERT_RC_DEV((a_pDevIns), &(a_pThis)->CritSect, rcLock); \ 87 87 } while (0) 88 88 … … 92 92 #define DEVHDA_LOCK_RETURN(a_pDevIns, a_pThis, a_rcBusy) \ 93 93 do { \ 94 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, a_rcBusy); \94 int const rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, a_rcBusy); \ 95 95 if (rcLock == VINF_SUCCESS) \ 96 96 { /* likely */ } \ … … 107 107 # define DEVHDA_LOCK_RETURN_VOID(a_pDevIns, a_pThis) \ 108 108 do { \ 109 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \109 int const rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \ 110 110 if (rcLock == VINF_SUCCESS) \ 111 111 { /* likely */ } \ 112 112 else \ 113 113 { \ 114 AssertRC(rcLock); \114 PDM_CRITSECT_RELEASE_ASSERT_RC_DEV((a_pDevIns), &(a_pThis)->CritSect, rcLock); \ 115 115 return; \ 116 116 } \ … … 4081 4081 RT_ZERO(StreamDummyShared); RT_ZERO(StreamDummyR3)); 4082 4082 4083 PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED); /* timer code requires this */ 4083 rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED); /* timer code requires this */ 4084 AssertRCReturn(rc, rc); 4084 4085 rc = hdaR3StreamSetUp(pDevIns, pThis, pStreamShared, pStreamR3, idStream); 4085 4086 PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); … … 4753 4754 4754 4755 if (PDMDevHlpCritSectIsInitialized(pDevIns, &pThis->CritSect)) 4755 PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED);4756 (void)PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED); 4756 4757 4757 4758 PHDADRIVER pDrv; -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r90247 r90447 640 640 #define DEVAC97_LOCK(a_pDevIns, a_pThis) \ 641 641 do { \ 642 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \643 AssertRC(rcLock); \642 int const rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, VERR_IGNORED); \ 643 PDM_CRITSECT_RELEASE_ASSERT_RC_DEV((a_pDevIns), &(a_pThis)->CritSect, rcLock); \ 644 644 } while (0) 645 645 … … 651 651 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, a_rcBusy); \ 652 652 if (rcLock == VINF_SUCCESS) \ 653 break; \ 654 AssertRC(rcLock); \ 655 return rcLock; \ 653 { /* likely */ } \ 654 else \ 655 { \ 656 AssertRC(rcLock); \ 657 return rcLock; \ 658 } \ 656 659 } while (0) 657 660
Note:
See TracChangeset
for help on using the changeset viewer.